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 by williamc, Tue Apr 13 17:30:19 1999 UTC vs.
Revision 1.21.2.5 by williamc, Thu Aug 19 09:12:32 1999 UTC

# Line 37 | Line 37 | sub ParseBuildFile {
37                  'ClassPath_StartTag' => \&setBlockClassPath,
38                  'lib' => 'none',
39                  'lib_StartTag' => \&lib_start,
40 <                'lib_EndTag' => 'none'
40 >                'lib_EndTag' => 'none',
41 >                'ignore' => 'none',
42 >                'ignore_EndTag' => \&ignoretag_end,
43 >                'ignore_StartTag' => \&ignoretag,
44 >                'Architecture_StartTag' => \&Arch_Start,
45 >                'Architecture_EndTag' => \&Arch_End,
46 >                'Architecture' => \&OutToMakefile
47          };
48          use Utilities::Switcher;
49          $switch=Switcher->new($SupportedTags, $fullfilename);
# Line 103 | Line 109 | sub Class_StartTag {
109          my @vars=@_;
110          
111          $hashref=$switch->SetupValueHash(\@vars);
112 +        if ( $Arch ) {
113          if ( defined $$hashref{'type'} ) {
114                  $ClassName=$$hashref{'type'};
115          }
116 +        }
117   }
118  
119   sub ClassPath_StartTag {
# Line 114 | Line 122 | sub ClassPath_StartTag {
122          my $hashref;
123  
124          $hashref=$switch->SetupValueHash(\@vars);
125 +        if ( $Arch ) {
126          if ( defined $$hashref{'defaultpath'} ) {
127          }
128 +        }
129   }
130  
131   sub Bin_start {
# Line 130 | Line 140 | sub Bin_start {
140          
141          $hashref=$switch->SetupValueHash(\@vars);
142          $switch->checkparam($hashref, $name, 'file');
143 +        if ( $Arch ) {
144          if ( ! defined $$hashref{name} ) {
145                  ($$hashref{name}=$$hashref{file})=~s/\..*//;
146          }
# Line 140 | Line 151 | sub Bin_start {
151          ($objectname=$$hashref{file})=~s/\..*/\.o/;
152          ($objectname_d=$$hashref{file})=~s/\..*/_d\.o/;
153          ($objectname_Insure=$$hashref{file})=~s/\..*/_Insure\.o/;
154 <        print GNUmakefile "bin:$$hashref{name}\n";
154 >        print GNUmakefile "bin:$$hashref{name}_o\n";
155          print GNUmakefile "bin_debug:$$hashref{name}_d\n";
156          print GNUmakefile "bin_insure:$$hashref{name}_Insure\n";
157          print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
# Line 162 | Line 173 | sub Bin_start {
173   print GNUmakefile <<ENDTEXT;
174   $$hashref{name}_d.exe:\$(libslocal_d)
175   $$hashref{name}.exe:\$(libslocal)
176 + ifdef MCCABE_DATA_DIR
177 + $$hashref{name}_mccabe.exe: \$(libslocal_d) $(MCCABE_DATA_DIR)/mccabeinstr/instplus.cpp
178 + endif
179   $$hashref{name}_Insure.exe:\$(libslocal_I)
180   $$hashref{name}_d:$$hashref{name}_d.exe
181          \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
# Line 169 | Line 183 | $$hashref{name}_Insure:$$hashref{name}_I
183          \@mv $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
184   $$hashref{name}:$$hashref{name}_d.exe
185          \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
186 < $$hashref{name}_o:$$hashref{name}_o.exe
186 > $$hashref{name}_o:$$hashref{name}.exe
187          \@mv $$hashref{name}.exe \$(binarystore)/$$hashref{name}
188 < binfiles+=$filename
188 > binfiles+=$$hashref{file}
189   bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure
190   ENDTEXT
191 +        }
192   }
193  
194   sub External_StartTag {
# Line 200 | Line 215 | sub Group_start {
215          
216          $hashref=$switch->SetupValueHash(\@vars);
217          $switch->checkparam($hashref, $name, 'name');
218 +        if ( $Arch ) {
219          print GNUmakefile "GROUP_".$$hashref{'name'};
220          if ( defined $$hashref{'version'} ) {
221                  print GNUmakefile "_V_".$$hashref{'version'};
222          }
223          print GNUmakefile "=true\n";
224 +        }
225   }      
226  
227   sub External {
# Line 231 | Line 248 | sub Use_start {
248          
249          $hashref=$switch->SetupValueHash(\@vars);
250          $switch->checkparam($hashref, $name, "name");
251 +        if ( $Arch ) {
252          $filename=SCRAMUtils::checkfile(
253                  "$ENV{INTsrc}/$$hashref{name}/BuildFile");
254          if ( $filename ne "" ) {
255            ParseBuildFile_Export( $filename );
256          }
257 +        }
258   }
259  
260   sub CheckBuildFile {
# Line 268 | Line 287 | sub AssociateGroup {
287          }
288   }
289  
290 + sub ignoretag {
291 +        my $name=shift;
292 +        my @vars=@_;
293 +        
294 +        $Arch=0;
295 +        push @ARCHBLOCK, $Arch;
296 + }
297 +
298 + sub ignoretag_end {
299 +        my $name=shift;
300 +        my @vars=@_;
301 +        
302 +        pop @ARCHBLOCK;
303 +        $Arch=$ARCHBLOCK[$#ARCHBLOCK];
304 + }
305 +
306 + sub Arch_Start {
307 +        my $name=shift;
308 +        my @vars=@_;
309 +        my $hashref;
310 +
311 +        $hashref=$toolswitch->SetupValueHash( \@vars );
312 +        $toolswitch->checkparam($hashref, $name, 'name');
313 +        #( ($$hashref{name}=~/$ENV{SCRAM_ARCH}/) )?$Arch=1:$Arch=0;
314 +        ( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($Arch=1) : ($Arch=0);
315 +        push @ARCHBLOCK, $Arch;
316 + }
317 + sub Arch_End {
318 +        my $name=shift;
319 +        my @vars=@_;
320 +
321 +        pop @ARCHBLOCK;
322 +        $Arch=$ARCHBLOCK[$#ARCHBLOCK];
323 + }
324 +
325   # Split up the Class Block String into a useable array
326   sub _CutBlock {
327      my $string= shift @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines