ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildFile.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildFile.pm (file contents):
Revision 1.21.2.7 by williamc, Tue Sep 7 10:09:39 1999 UTC vs.
Revision 1.21.2.20 by williamc, Fri Sep 24 16:34:27 1999 UTC

# Line 46 | Line 46 | sub ParseBuildFile {
46                  'Architecture' => \&OutToMakefile,
47                  'LibType_StartTag' => \&LibType_Start,
48                  'LibType_EndTag' => 'none',
49 <                'LibType' => 'none'
49 >                #'LibType' => \&OutToScreen
50 >                'LibType' => \&LibType_text
51          };
52          use Utilities::Switcher;
53          $switch=Switcher->new($SupportedTags, $fullfilename);
# Line 75 | Line 76 | sub ParseBuildFile_Export {
76                  'export_StartTag' => \&export_start,
77                  'export_EndTag' => \&export_end,
78                  'lib_StartTag' => \&lib_start_export,
79 +                'External_StartTag' => \&Ext_start_export,
80                  'lib' => 'none'
81          };
82          use Utilities::Switcher;
# Line 151 | Line 153 | sub Bin_start {
153          #$fileclass=$toolbox->getclass($file);
154          #$toolbox->maketargets("exe",$fileclass, $$hashref{name}, $file );
155          ($filename=$$hashref{file})=~s/\..*//;
156 <        ($objectname=$$hashref{file})=~s/\..*/\.o/;
156 >        ($objectname_o=$$hashref{file})=~s/\..*/_o\.o/;
157          ($objectname_d=$$hashref{file})=~s/\..*/_d\.o/;
158          ($objectname_Insure=$$hashref{file})=~s/\..*/_Insure\.o/;
159          print GNUmakefile "bin:$$hashref{name}_o\n";
160          print GNUmakefile "bin_debug:$$hashref{name}_d\n";
161 +        print GNUmakefile "bin_debug_local:$$hashref{name}_l_d\n";
162          print GNUmakefile "bin_insure:$$hashref{name}_Insure\n";
163 +        print GNUmakefile "bin_Insure:$$hashref{name}_Insure\n";
164   #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
165   #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
166          print GNUmakefile ".INTERMEDIATE::$$hashref{name}.exe\n";
167          print GNUmakefile "$$hashref{name}_Insure:.psrc\n";
168          print GNUmakefile "$$hashref{name}_d.exe:$objectname_d\n";
169          print GNUmakefile "\t\$(CClinkCmdDebug)\n";
170 +        print GNUmakefile "$$hashref{name}_l_d.exe:$objectname_d\n";
171 +        print GNUmakefile "\t\$(CClinkCmdDebugLocal)\n";
172          print GNUmakefile "$$hashref{name}_Insure.exe:$objectname_Insure\n";
173          print GNUmakefile "\t\$(CClinkCmdInsure)\n";
174 <        print GNUmakefile "$$hashref{name}.exe:$objectname\n";
174 >        print GNUmakefile "$$hashref{name}_o.exe:$objectname_o\n";
175          print GNUmakefile "\t\$(CClinkCmd)\n";
176 <        print GNUmakefile "$objectname:$$hashref{name}.dep\n";
176 >        print GNUmakefile "$objectname_o:$$hashref{name}.dep\n";
177          print GNUmakefile "$objectname_d:$$hashref{name}.dep\n";
178          print GNUmakefile "$objectname_Insure:$$hashref{name}.dep\n";
179          print GNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
# Line 175 | Line 181 | sub Bin_start {
181   #       print GNUmakefile "$$hashref{name}:$$hashref{file}\n";
182   print GNUmakefile <<ENDTEXT;
183   $$hashref{name}_d.exe:\$(libslocal_d)
184 < $$hashref{name}.exe:\$(libslocal)
184 > $$hashref{name}_o.exe:\$(libslocal)
185   ifdef MCCABE_DATA_DIR
186   $$hashref{name}_mccabe.exe: \$(libslocal_d) $(MCCABE_DATA_DIR)/mccabeinstr/instplus.cpp
187   endif
188   $$hashref{name}_Insure.exe:\$(libslocal_I)
189   $$hashref{name}_d:$$hashref{name}_d.exe
190          \@cp $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
191 + $$hashref{name}_l_d:$$hashref{name}_l_d.exe
192 +        \@cp $$hashref{name}_l_d.exe \$(binarystore)/$$hashref{name}
193   $$hashref{name}_Insure:$$hashref{name}_Insure.exe
194          \@cp $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
195   $$hashref{name}:$$hashref{name}_d.exe
196          \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
197 < $$hashref{name}_o:$$hashref{name}.exe
198 <        \@mv $$hashref{name}.exe \$(binarystore)/$$hashref{name}
197 > $$hashref{name}_o:$$hashref{name}_o.exe
198 >        \@mv $$hashref{name}_o.exe \$(binarystore)/$$hashref{name}
199   binfiles+=$$hashref{file}
200 < bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure
200 > bintargets+=$$hashref{name} $$hashref{name}_o $$hashref{name}_d $$hashref{name}_Insure
201   ENDTEXT
202          }
203   }
204  
205 + sub Ext_start_export {
206 +        my $name=shift;
207 +        my @vars=@_;
208 +        my $hashref;
209 +        
210 +        $hashref=$switch->SetupValueHash(\@vars);
211 +        if ( $Arch ) {
212 +         if ( $switchex->context('export') ) {
213 +          $$hashref{'ref'}=~tr[A-Z][a-z];
214 +          print GNUmakefile $$hashref{'ref'};
215 +          if ( defined $$hashref{'version'} ) {
216 +                print GNUmakefile "_V_".$$hashref{'version'};
217 +          }
218 +          print GNUmakefile "=true\n";
219 +         }
220 +        }
221 + }
222 +
223   sub External_StartTag {
224          my $name=shift;
225          my @vars=@_;
# Line 335 | Line 361 | sub OutToMakefile {
361          my $name=shift;
362          my @vars=@_;
363  
364 <        print GNUmakefile @vars;
364 >        if ( $Arch ) {
365 >          print GNUmakefile @vars;
366 >        }
367 > }
368 > sub OutToScreen {
369 >        my $name=shift;
370 >        my @vars=@_;
371 >
372 >        if ( $Arch ) {
373 >          print @vars;
374 >        }
375   }
376   sub setBlockClassPath {
377          my $name=shift;
# Line 399 | Line 435 | sub LibType_Start {
435          my @vars=@_;
436          my $hashref;
437  
438 +        if ( $Arch ) {
439          $hashref=$switch->SetupValueHash( \@vars );
440          $switch->checkparam($hashref, $name, 'type');
441          
# Line 407 | Line 444 | sub LibType_Start {
444          if ( $$hashref{'type'}=~/^archive/i ) {
445            print GNUmakefile "LibArchive=true\n";
446          }
447 <        elsif ($$hashref{'type'}=~/debugarchive/i ) {
447 >        elsif ($$hashref{'type'}=~/debug_archive/i ) {
448            print GNUmakefile "LibDebugArchive=true\n";
449          }
450 +        elsif ($$hashref{'type'}=~/debug_shared/i ) {
451 +          print GNUmakefile "LibDebugShared=true\n";
452 +        }
453          elsif ($$hashref{'type'}=~/shared/i ) {
454            print GNUmakefile 'LibShared=true'."\n";
455          }
416        elsif ($$hashref{'type'}=~/debugshared/i ) {
417          print GNUmakefile "LibDebugShared=true\n";
418        }
456          print GNUmakefile "\n";
457 +        }
458   }
459 + sub LibType_text {
460 +        my $name=shift;
461 +        my @vars=@_;
462 +
463 +        if ( $Arch ) {
464 +          print GNUmakefile "libmsg::\n\t\@echo Library info: ";
465 +          print GNUmakefile @vars;
466 +          print GNUmakefile "\n";
467 +        }
468 + }
469 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines