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.2 by williamc, Tue May 11 09:02:58 1999 UTC vs.
Revision 1.21.2.17 by williamc, Fri Sep 17 13:10:43 1999 UTC

# Line 43 | Line 43 | sub ParseBuildFile {
43                  'ignore_StartTag' => \&ignoretag,
44                  'Architecture_StartTag' => \&Arch_Start,
45                  'Architecture_EndTag' => \&Arch_End,
46 <                'Architecture' => \&OutToMakefile
46 >                'Architecture' => \&OutToMakefile,
47 >                'LibType_StartTag' => \&LibType_Start,
48 >                'LibType_EndTag' => 'none',
49 >                #'LibType' => \&OutToScreen
50 >                'LibType' => \&LibType_text
51          };
52          use Utilities::Switcher;
53          $switch=Switcher->new($SupportedTags, $fullfilename);
# Line 72 | 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 156 | sub Bin_start {
156          ($objectname=$$hashref{file})=~s/\..*/\.o/;
157          ($objectname_d=$$hashref{file})=~s/\..*/_d\.o/;
158          ($objectname_Insure=$$hashref{file})=~s/\..*/_Insure\.o/;
159 <        print GNUmakefile "bin:$$hashref{name}\n";
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}_d_l\n";
162          print GNUmakefile "bin_insure:$$hashref{name}_Insure\n";
163 <        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
164 <        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
163 > #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
164 > #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
165          print GNUmakefile ".INTERMEDIATE::$$hashref{name}.exe\n";
166          print GNUmakefile "$$hashref{name}_Insure:.psrc\n";
167          print GNUmakefile "$$hashref{name}_d.exe:$objectname_d\n";
168          print GNUmakefile "\t\$(CClinkCmdDebug)\n";
169 +        print GNUmakefile "$$hashref{name}_d_l.exe:$objectname_d\n";
170 +        print GNUmakefile "\t\$(CClinkCmdDebugLocal)\n";
171          print GNUmakefile "$$hashref{name}_Insure.exe:$objectname_Insure\n";
172          print GNUmakefile "\t\$(CClinkCmdInsure)\n";
173          print GNUmakefile "$$hashref{name}.exe:$objectname\n";
# Line 167 | Line 175 | sub Bin_start {
175          print GNUmakefile "$objectname:$$hashref{name}.dep\n";
176          print GNUmakefile "$objectname_d:$$hashref{name}.dep\n";
177          print GNUmakefile "$objectname_Insure:$$hashref{name}.dep\n";
178 <        print GNUmakefile "$ENV{LOCALTOP}/\$(workdir)/$$hashref{name}.dep: $(clientmakefile) $$hashref{file}\n";
179 <        print GNUmakefile "-include $ENV{LOCALTOP}/\$(workdir)/$$hashref{name}.dep\n";
178 >        print GNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
179 >        print GNUmakefile "-include $$hashref{name}.dep\n";
180   #       print GNUmakefile "$$hashref{name}:$$hashref{file}\n";
181   print GNUmakefile <<ENDTEXT;
182   $$hashref{name}_d.exe:\$(libslocal_d)
183   $$hashref{name}.exe:\$(libslocal)
184 + ifdef MCCABE_DATA_DIR
185 + $$hashref{name}_mccabe.exe: \$(libslocal_d) $(MCCABE_DATA_DIR)/mccabeinstr/instplus.cpp
186 + endif
187   $$hashref{name}_Insure.exe:\$(libslocal_I)
188   $$hashref{name}_d:$$hashref{name}_d.exe
189 <        \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
189 >        \@cp $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
190 > $$hashref{name}_d_l:$$hashref{name}_d_l.exe
191 >        \@cp $$hashref{name}_d_l.exe \$(binarystore)/$$hashref{name}
192   $$hashref{name}_Insure:$$hashref{name}_Insure.exe
193 <        \@mv $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
193 >        \@cp $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
194   $$hashref{name}:$$hashref{name}_d.exe
195          \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
196 < $$hashref{name}_o:$$hashref{name}_o.exe
196 > $$hashref{name}_o:$$hashref{name}.exe
197          \@mv $$hashref{name}.exe \$(binarystore)/$$hashref{name}
198 < binfiles+=$filename
198 > binfiles+=$$hashref{file}
199   bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure
200   ENDTEXT
201          }
202   }
203  
204 + sub Ext_start_export {
205 +        my $name=shift;
206 +        my @vars=@_;
207 +        my $hashref;
208 +        
209 +        $hashref=$switch->SetupValueHash(\@vars);
210 +        if ( $Arch ) {
211 +         if ( $switchex->context('export') ) {
212 +          $$hashref{'ref'}=~tr[A-Z][a-z];
213 +          print GNUmakefile $$hashref{'ref'};
214 +          if ( defined $$hashref{'version'} ) {
215 +                print GNUmakefile "_V_".$$hashref{'version'};
216 +          }
217 +          print GNUmakefile "=true\n";
218 +         }
219 +        }
220 + }
221 +
222   sub External_StartTag {
223          my $name=shift;
224          my @vars=@_;
# Line 329 | Line 360 | sub OutToMakefile {
360          my $name=shift;
361          my @vars=@_;
362  
363 <        print GNUmakefile @vars;
363 >        if ( $Arch ) {
364 >          print GNUmakefile @vars;
365 >        }
366 > }
367 > sub OutToScreen {
368 >        my $name=shift;
369 >        my @vars=@_;
370 >
371 >        if ( $Arch ) {
372 >          print @vars;
373 >        }
374   }
375   sub setBlockClassPath {
376          my $name=shift;
# Line 384 | Line 425 | sub lib_start {
425             print GNUmakefile "lib+=$$hashref{name}\n";
426          }
427   }
428 +
429 + #
430 + # libtype specification
431 + #
432 + sub LibType_Start {
433 +        my $name=shift;
434 +        my @vars=@_;
435 +        my $hashref;
436 +
437 +        if ( $Arch ) {
438 +        $hashref=$switch->SetupValueHash( \@vars );
439 +        $switch->checkparam($hashref, $name, 'type');
440 +        
441 +        print GNUmakefile "# Specify Library Type\n";
442 +        print GNUmakefile "DefaultLibsOff=yes\n";
443 +        if ( $$hashref{'type'}=~/^archive/i ) {
444 +          print GNUmakefile "LibArchive=true\n";
445 +        }
446 +        elsif ($$hashref{'type'}=~/debug_archive/i ) {
447 +          print GNUmakefile "LibDebugArchive=true\n";
448 +        }
449 +        elsif ($$hashref{'type'}=~/debug_shared/i ) {
450 +          print GNUmakefile "LibDebugShared=true\n";
451 +        }
452 +        elsif ($$hashref{'type'}=~/shared/i ) {
453 +          print GNUmakefile 'LibShared=true'."\n";
454 +        }
455 +        print GNUmakefile "\n";
456 +        }
457 + }
458 + sub LibType_text {
459 +        my $name=shift;
460 +        my @vars=@_;
461 +
462 +        if ( $Arch ) {
463 +          print GNUmakefile "libmsg::\n\t\@echo Library info: ";
464 +          print GNUmakefile @vars;
465 +          print GNUmakefile "\n";
466 +        }
467 + }
468 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines