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.7 by williamc, Tue Sep 7 10:09:39 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' => 'none'
50          };
51          use Utilities::Switcher;
52          $switch=Switcher->new($SupportedTags, $fullfilename);
# Line 151 | Line 154 | sub Bin_start {
154          ($objectname=$$hashref{file})=~s/\..*/\.o/;
155          ($objectname_d=$$hashref{file})=~s/\..*/_d\.o/;
156          ($objectname_Insure=$$hashref{file})=~s/\..*/_Insure\.o/;
157 <        print GNUmakefile "bin:$$hashref{name}\n";
157 >        print GNUmakefile "bin:$$hashref{name}_o\n";
158          print GNUmakefile "bin_debug:$$hashref{name}_d\n";
159          print GNUmakefile "bin_insure:$$hashref{name}_Insure\n";
160 <        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
161 <        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
160 > #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
161 > #       print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
162          print GNUmakefile ".INTERMEDIATE::$$hashref{name}.exe\n";
163          print GNUmakefile "$$hashref{name}_Insure:.psrc\n";
164          print GNUmakefile "$$hashref{name}_d.exe:$objectname_d\n";
# Line 167 | Line 170 | sub Bin_start {
170          print GNUmakefile "$objectname:$$hashref{name}.dep\n";
171          print GNUmakefile "$objectname_d:$$hashref{name}.dep\n";
172          print GNUmakefile "$objectname_Insure:$$hashref{name}.dep\n";
173 <        print GNUmakefile "$ENV{LOCALTOP}/\$(workdir)/$$hashref{name}.dep: $(clientmakefile) $$hashref{file}\n";
174 <        print GNUmakefile "-include $ENV{LOCALTOP}/\$(workdir)/$$hashref{name}.dep\n";
173 >        print GNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
174 >        print GNUmakefile "-include $$hashref{name}.dep\n";
175   #       print GNUmakefile "$$hashref{name}:$$hashref{file}\n";
176   print GNUmakefile <<ENDTEXT;
177   $$hashref{name}_d.exe:\$(libslocal_d)
178   $$hashref{name}.exe:\$(libslocal)
179 + ifdef MCCABE_DATA_DIR
180 + $$hashref{name}_mccabe.exe: \$(libslocal_d) $(MCCABE_DATA_DIR)/mccabeinstr/instplus.cpp
181 + endif
182   $$hashref{name}_Insure.exe:\$(libslocal_I)
183   $$hashref{name}_d:$$hashref{name}_d.exe
184 <        \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
184 >        \@cp $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
185   $$hashref{name}_Insure:$$hashref{name}_Insure.exe
186 <        \@mv $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
186 >        \@cp $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
187   $$hashref{name}:$$hashref{name}_d.exe
188          \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
189 < $$hashref{name}_o:$$hashref{name}_o.exe
189 > $$hashref{name}_o:$$hashref{name}.exe
190          \@mv $$hashref{name}.exe \$(binarystore)/$$hashref{name}
191 < binfiles+=$filename
191 > binfiles+=$$hashref{file}
192   bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure
193   ENDTEXT
194          }
# Line 384 | Line 390 | sub lib_start {
390             print GNUmakefile "lib+=$$hashref{name}\n";
391          }
392   }
393 +
394 + #
395 + # libtype specification
396 + #
397 + sub LibType_Start {
398 +        my $name=shift;
399 +        my @vars=@_;
400 +        my $hashref;
401 +
402 +        $hashref=$switch->SetupValueHash( \@vars );
403 +        $switch->checkparam($hashref, $name, 'type');
404 +        
405 +        print GNUmakefile "# Specify Library Type\n";
406 +        print GNUmakefile "DefaultLibsOff=yes\n";
407 +        if ( $$hashref{'type'}=~/^archive/i ) {
408 +          print GNUmakefile "LibArchive=true\n";
409 +        }
410 +        elsif ($$hashref{'type'}=~/debugarchive/i ) {
411 +          print GNUmakefile "LibDebugArchive=true\n";
412 +        }
413 +        elsif ($$hashref{'type'}=~/shared/i ) {
414 +          print GNUmakefile 'LibShared=true'."\n";
415 +        }
416 +        elsif ($$hashref{'type'}=~/debugshared/i ) {
417 +          print GNUmakefile "LibDebugShared=true\n";
418 +        }
419 +        print GNUmakefile "\n";
420 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines