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.14 by williamc, Wed Sep 15 07:46:59 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          };
51          use Utilities::Switcher;
52          $switch=Switcher->new($SupportedTags, $fullfilename);
# Line 72 | Line 75 | sub ParseBuildFile_Export {
75                  'export_StartTag' => \&export_start,
76                  'export_EndTag' => \&export_end,
77                  'lib_StartTag' => \&lib_start_export,
78 +                'External_StartTag' => \&Ext_start_export,
79                  'lib' => 'none'
80          };
81          use Utilities::Switcher;
# Line 151 | Line 155 | sub Bin_start {
155          ($objectname=$$hashref{file})=~s/\..*/\.o/;
156          ($objectname_d=$$hashref{file})=~s/\..*/_d\.o/;
157          ($objectname_Insure=$$hashref{file})=~s/\..*/_Insure\.o/;
158 <        print GNUmakefile "bin:$$hashref{name}\n";
158 >        print GNUmakefile "bin:$$hashref{name}_o\n";
159          print GNUmakefile "bin_debug:$$hashref{name}_d\n";
160          print GNUmakefile "bin_insure:$$hashref{name}_Insure\n";
161 <        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
162 <        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
161 > #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
162 > #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
163          print GNUmakefile ".INTERMEDIATE::$$hashref{name}.exe\n";
164          print GNUmakefile "$$hashref{name}_Insure:.psrc\n";
165          print GNUmakefile "$$hashref{name}_d.exe:$objectname_d\n";
# Line 167 | Line 171 | sub Bin_start {
171          print GNUmakefile "$objectname:$$hashref{name}.dep\n";
172          print GNUmakefile "$objectname_d:$$hashref{name}.dep\n";
173          print GNUmakefile "$objectname_Insure:$$hashref{name}.dep\n";
174 <        print GNUmakefile "$ENV{LOCALTOP}/\$(workdir)/$$hashref{name}.dep: $(clientmakefile) $$hashref{file}\n";
175 <        print GNUmakefile "-include $ENV{LOCALTOP}/\$(workdir)/$$hashref{name}.dep\n";
174 >        print GNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
175 >        print GNUmakefile "-include $$hashref{name}.dep\n";
176   #       print GNUmakefile "$$hashref{name}:$$hashref{file}\n";
177   print GNUmakefile <<ENDTEXT;
178   $$hashref{name}_d.exe:\$(libslocal_d)
179   $$hashref{name}.exe:\$(libslocal)
180 + ifdef MCCABE_DATA_DIR
181 + $$hashref{name}_mccabe.exe: \$(libslocal_d) $(MCCABE_DATA_DIR)/mccabeinstr/instplus.cpp
182 + endif
183   $$hashref{name}_Insure.exe:\$(libslocal_I)
184   $$hashref{name}_d:$$hashref{name}_d.exe
185 <        \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
185 >        \@cp $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
186   $$hashref{name}_Insure:$$hashref{name}_Insure.exe
187 <        \@mv $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
187 >        \@cp $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
188   $$hashref{name}:$$hashref{name}_d.exe
189          \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
190 < $$hashref{name}_o:$$hashref{name}_o.exe
190 > $$hashref{name}_o:$$hashref{name}.exe
191          \@mv $$hashref{name}.exe \$(binarystore)/$$hashref{name}
192 < binfiles+=$filename
192 > binfiles+=$$hashref{file}
193   bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure
194   ENDTEXT
195          }
196   }
197  
198 + sub Ext_start_export {
199 +        my $name=shift;
200 +        my @vars=@_;
201 +        my $hashref;
202 +        
203 +        $hashref=$switch->SetupValueHash(\@vars);
204 +        if ( $Arch ) {
205 +         if ( $switchex->context('export') ) {
206 +          $$hashref{'ref'}=~tr[A-Z][a-z];
207 +          print GNUmakefile $$hashref{'ref'};
208 +          if ( defined $$hashref{'version'} ) {
209 +                print GNUmakefile "_V_".$$hashref{'version'};
210 +          }
211 +          print GNUmakefile "=true\n";
212 +         }
213 +        }
214 + }
215 +
216   sub External_StartTag {
217          my $name=shift;
218          my @vars=@_;
# Line 331 | Line 356 | sub OutToMakefile {
356  
357          print GNUmakefile @vars;
358   }
359 + sub OutToScreen {
360 +        my $name=shift;
361 +        my @vars=@_;
362 +
363 +        print @vars;
364 + }
365   sub setBlockClassPath {
366          my $name=shift;
367          my @vars=@_;
# Line 384 | Line 415 | sub lib_start {
415             print GNUmakefile "lib+=$$hashref{name}\n";
416          }
417   }
418 +
419 + #
420 + # libtype specification
421 + #
422 + sub LibType_Start {
423 +        my $name=shift;
424 +        my @vars=@_;
425 +        my $hashref;
426 +
427 +        if ( $Arch ) {
428 +        $hashref=$switch->SetupValueHash( \@vars );
429 +        $switch->checkparam($hashref, $name, 'type');
430 +        
431 +        print GNUmakefile "# Specify Library Type\n";
432 +        print GNUmakefile "DefaultLibsOff=yes\n";
433 +        if ( $$hashref{'type'}=~/^archive/i ) {
434 +          print GNUmakefile "LibArchive=true\n";
435 +        }
436 +        elsif ($$hashref{'type'}=~/debug_archive/i ) {
437 +          print GNUmakefile "LibDebugArchive=true\n";
438 +        }
439 +        elsif ($$hashref{'type'}=~/debug_shared/i ) {
440 +          print GNUmakefile "LibDebugShared=true\n";
441 +        }
442 +        elsif ($$hashref{'type'}=~/shared/i ) {
443 +          print GNUmakefile 'LibShared=true'."\n";
444 +        }
445 +        print GNUmakefile "\n";
446 +        }
447 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines