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.5 by williamc, Thu Mar 18 10:32:03 1999 UTC vs.
Revision 1.21.2.32 by williamc, Wed Oct 20 12:58:01 1999 UTC

# Line 8 | Line 8 | BEGIN {
8   use ToolBox;
9   $buildfile="BuildFile";
10   $toolbox=ToolBox->new();
11 + $Arch=1;
12 + push @ARCHBLOCK, $Arch;
13   }
14  
15   #Parse the BuildFile
16   sub ParseBuildFile {
17          my $base=shift;
18 <        my $path=shift;
18 >        $path=shift;
19          my $filename=shift @_;
20          my $fullfilename="$base/$path/$filename";
21          #print "Processing $fullfilename\n";
22          # This hash defines which Document Elements we can use
23 +        $numbins=0;
24 +        $envnum=0;
25 +        $envlevel=0;
26 +        $currentenv="$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk";
27          my $SupportedTags={
28                  'Use' => \&OutToMakefile,
29                  'Use_StartTag' => \&Use_start,
# Line 29 | Line 35 | sub ParseBuildFile {
35                  'ConfigurationClass' => \&OutToMakefile,
36                  'AssociateGroup' => \&AssociateGroup,
37                  'none' => \&OutToMakefile,
38 <                'Bin' => \&OutToMakefile,
38 >                'Bin' => 'none',
39                  'Bin_StartTag' => \&Bin_start,
40                  'ClassPath' => \&OutToMakefile,
41 <                'ClassPath_StartTag' => \&setBlockClassPath
41 >                'ClassPath_StartTag' => \&setBlockClassPath,
42 >                'Environment' => \&OutToMakefile,
43 >                'Environment_StartTag' => \&Environment_start,
44 >                'Environment_EndTag' => \&Environment_end,
45 >                'export' => \&OutToMakefile,
46 >                'export_StartTag' => \&export_start,
47 >                'export_EndTag' => \&export_end,
48 >                'lib' => 'none',
49 >                'lib_StartTag' => \&lib_start,
50 >                'lib_EndTag' => 'none',
51 >                'ignore' => 'none',
52 >                'ignore_EndTag' => \&ignoretag_end,
53 >                'ignore_StartTag' => \&ignoretag,
54 >                'Architecture_StartTag' => \&Arch_Start,
55 >                'Architecture_EndTag' => \&Arch_End,
56 >                'Architecture' => \&OutToMakefile,
57 >                'LibType_StartTag' => \&LibType_Start,
58 >                'LibType_EndTag' => 'none',
59 >                #'LibType' => \&OutToScreen
60 >                'LibType' => \&LibType_text
61          };
62          use Utilities::Switcher;
63          $switch=Switcher->new($SupportedTags, $fullfilename);
# Line 40 | Line 65 | sub ParseBuildFile {
65          #open a temporary gnumakefile to store output.
66          use Utilities::AddDir;
67          AddDir::adddir("$ENV{LOCALTOP}/$ENV{INTwork}/${path}");
68 <        open ( GNUmakefile, ">$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk") or die 'Unable to open /$ENV{INTwork}/${path}/BuildFile.mk $!\n';
68 >        my $fh=FileHandle->new();
69 >        open ( $fh, ">$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk"
70 >          ) or die 'Unable to open /$ENV{INTwork}/${path}/BuildFile.mk $!\n';
71 >        @filehandlestack=($fh);
72 >        # make an alias
73 > #       open ( GNUmakefile, ">&=$fh") or die 'Unable to create alias for '.
74 > #                       "Filehandle $!\n";
75 >        *GNUmakefile=$fh;
76          if ( -e $ENV{LatestBuildFile} ) {
77            print GNUmakefile "include $ENV{LatestBuildFile}\n";
78          }
# Line 48 | Line 80 | sub ParseBuildFile {
80   #               "$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk\n";
81          $ENV{LatestBuildFile}="$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk";
82          $switch->parse(); # sort out supported tags
83 +        if ( $numbins > 0 ) {
84 +         print GNUmakefile <<ENDTEXT;
85 + ifndef BINMODE
86 + help::
87 + \t\@echo Generic Binary targets
88 + \t\@echo ----------------------
89 + endif
90 + ENDTEXT
91 +         foreach $target ( keys %$targettypes ) {
92 +         print GNUmakefile <<ENDTEXT;
93 + ifndef BINMODE
94 + help::
95 + \t\@echo $target
96 + endif
97 + ENDTEXT
98 +         }
99 +        }
100          close GNUmakefile;
101   }
102  
103 + sub ParseBuildFile_Export {
104 +        my $filename=shift;
105 +        use Tool;
106 +        # This hash defines which Document Elements we can use
107 +        my $SupportedTags={
108 +                'none' => 'none',
109 +                'export' => \&OutToMakefile,
110 +                'export_StartTag' => \&use_export_start,
111 +                'export_EndTag' => \&use_export_end,
112 +                'lib_StartTag' => \&lib_start_export,
113 +                'External_StartTag' => \&Ext_start_export,
114 +                'lib' => 'none'
115 +        };
116 +        use Utilities::Switcher;
117 +        $switchex=Switcher->new($SupportedTags, $filename);
118 +        $switchex->{Strict_no_cr}='no';
119 +        $switchex->parse(); # sort out supported tags
120 + }
121 +
122   sub initialterms() {
123          my $name=shift;
124          my @string=@_;
# Line 80 | Line 148 | sub Class_StartTag {
148          my @vars=@_;
149          
150          $hashref=$switch->SetupValueHash(\@vars);
151 +        if ( $Arch ) {
152          if ( defined $$hashref{'type'} ) {
153                  $ClassName=$$hashref{'type'};
154          }
155 +        }
156   }
157  
158   sub ClassPath_StartTag {
# Line 91 | Line 161 | sub ClassPath_StartTag {
161          my $hashref;
162  
163          $hashref=$switch->SetupValueHash(\@vars);
164 +        if ( $Arch ) {
165          if ( defined $$hashref{'defaultpath'} ) {
166          }
167 +        }
168   }
169  
170   sub Bin_start {
# Line 102 | Line 174 | sub Bin_start {
174          my $fileclass;
175          my @tools;
176          my $tool;
177 +        my $filename;
178 +        my $objectname;
179          
180          $hashref=$switch->SetupValueHash(\@vars);
181          $switch->checkparam($hashref, $name, 'file');
182 +        if ( $Arch ) {
183          if ( ! defined $$hashref{name} ) {
184                  ($$hashref{name}=$$hashref{file})=~s/\..*//;
185          }
186          # This stuff for later
187          #$fileclass=$toolbox->getclass($file);
188          #$toolbox->maketargets("exe",$fileclass, $$hashref{name}, $file );
189 <        print GNUmakefile "bin::$$hashref{name}\n";
190 <        print GNUmakefile "$$hashref{name}::$$hashref{file}\n";
189 >
190 >        ($filename=$$hashref{file})=~s/\..*//;
191 >
192 >        # Create a new directory for each binary target
193 >        my $dirname="bin_".$$hashref{name};
194 >        AddDir::adddir("$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname");
195 >        open (binGNUmakefile,
196 >           ">$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname/BuildFile.mk") or die           "Unable to make $ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname/".
197 >           "BuildFile.mk $!\n";
198 >
199 >        # Create the link targets
200 >        $numbins++;
201 >        my $fh=$filehandlestack[0];
202 >        print $fh <<ENDTEXT;
203 >
204 > # Link Targets to binary directories
205 > ifdef BINMODE
206 > # We dont want to build a library here
207 > override files:=
208 > endif
209 > ifndef BINMODE
210 >
211 > define stepdown_$$hashref{'name'}
212 > if [ -d "$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname" ]; then \\
213 > cd $ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname; \\
214 > \$(MAKE) BINMODE=true LatestBuildFile=$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname/BuildFile.mk workdir=\$(workdir)/$dirname -f \$(TOOL_HOME)/basics.mk \$\@; \\
215 > fi
216 > endef
217 >
218 > define stepdown2_$$hashref{'name'}
219 > if [ -d "$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname" ]; then \\
220 > cd $ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname; \\
221 > \$(MAKE) BINMODE=true LatestBuildFile=$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname/BuildFile.mk workdir=\$(workdir)/$dirname -f \$(TOOL_HOME)/basics.mk \$\*; \\
222 > fi
223 >
224 > endef
225 >
226 > bin_$$hashref{'name'}_%:: dummy
227 >        \@\$(stepdown2_$$hashref{'name'})
228 >
229 > $$hashref{'name'}_%:: dummy
230 >        \@\$(stepdown_$$hashref{'name'})
231 >
232 > help bin bin_debug bin_debug_local bin_insure bin_Insure clean $$hashref{'name'}:: dummy
233 >        \@\$(stepdown_$$hashref{'name'})
234 >
235 > binfiles+=$$hashref{'file'}
236 > endif
237 >
238 >
239 > ENDTEXT
240 >
241 >
242 > # the binary specifics makefile
243 >        print binGNUmakefile "include $currentenv\n";
244 >        print binGNUmakefile "VPATH+=$ENV{LOCALTOP}/${path}\n";
245 >
246 > # alias for bin_Insure
247 >        print binGNUmakefile <<ENDTEXT;
248 >
249 > bin_insure:bin_Insure
250 > ifdef MAKETARGET_bin_insure
251 > MAKETARGET_$$hashref{name}_Insure=1
252 > endif
253 >
254 > # debuggging target
255 > $$hashref{'name'}_echo_% :: echo_%
256 >
257 > # help targets
258 > help::
259 > \t\@echo Targets For $$hashref{'name'}
260 > \t\@echo -------------------------------------
261 > \t\@echo $$hashref{'name'}  - default build
262 > \t\@echo bin_$$hashref{'name'}_clean - executable specific cleaning
263 > ENDTEXT
264 >
265 > # Make generic rules for each type
266 >        $targettypes={
267 >                "bin" => 'o',
268 >                "bin_debug" => 'd',
269 >                "bin_debug_local" => 'l_d',
270 >                "bin_Insure" => 'Insure'
271 >        };
272 >        #
273 >        foreach $target ( keys %$targettypes ) {
274 >          print binGNUmakefile <<ENDTEXT;
275 >
276 > # Type $target specifics
277 > ifdef MAKETARGET_$target
278 > MAKETARGET_$$hashref{name}_$$targettypes{$target}=1
279 > endif
280 > $target ::$$hashref{name}_$$targettypes{$target}
281 >
282 > bintargets+=$$hashref{name}_$$targettypes{$target}
283 > help::
284 > \t\@echo $$hashref{name}_$$targettypes{$target}
285 > clean::
286 > \t\@if [ -f \$(binarystore)/$$hashref{name}_$$targettypes{$target} ]; then \\
287 > \techo Removing \$(binarystore)/$$hashref{name}; \\
288 > \trm \$(binarystore)/$$hashref{name}_$$targettypes{$target}; \\
289 > \tfi
290 >
291 > ENDTEXT
292 >          ($objectname=$$hashref{file})=~s/\..*/_$$targettypes{$target}\.o/;
293 >          ${"objectname_$$targettypes{$target}"}=$objectname;
294 >          print binGNUmakefile "$objectname:$$hashref{name}.dep\n";
295 >        } # end loop
296 >
297 >        print binGNUmakefile "$$hashref{name}_Insure:.psrc\n";
298 >        print binGNUmakefile "$$hashref{name}_d.exe:$objectname_d\n";
299 >        print binGNUmakefile "\t\$(CClinkCmdDebug)\n";
300 >        print binGNUmakefile "$$hashref{name}_l_d.exe:$objectname_d\n";
301 >        print binGNUmakefile "\t\$(CClinkCmdDebugLocal)\n";
302 >        print binGNUmakefile "$$hashref{name}_Insure.exe:$objectname_Insure\n";
303 >        print binGNUmakefile "\t\$(CClinkCmdInsure)\n";
304 >        print binGNUmakefile "$$hashref{name}_o.exe:$objectname_o\n";
305 >        print binGNUmakefile "\t\$(CClinkCmd)\n";
306 >        print binGNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
307 >        print binGNUmakefile "-include $$hashref{name}.dep\n";
308 > print binGNUmakefile <<ENDTEXT;
309 > clean::
310 > \t\@if [ -f \$(binarystore)/$$hashref{name} ]; then \\
311 > \techo Removing \$(binarystore)/$$hashref{name}; \\
312 > \trm \$(binarystore)/$$hashref{name}; \\
313 > \tfi
314 >
315 > $$hashref{name}_d.exe:\$(libslocal_d)
316 > $$hashref{name}_o.exe:\$(libslocal)
317 > ifdef MCCABE_DATA_DIR
318 > $$hashref{name}_mccabe.exe: \$(libslocal_d) \$(MCCABE_DATA_DIR)/mccabeinstr/instplus.cpp
319 > endif
320 > $$hashref{name}_Insure.exe:\$(libslocal_I)
321 > $$hashref{name}_d:$$hashref{name}_d.exe
322 >        \@cp $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
323 > $$hashref{name}_l_d:$$hashref{name}_l_d.exe
324 >        \@cp $$hashref{name}_l_d.exe \$(binarystore)/$$hashref{name}
325 > $$hashref{name}_Insure:$$hashref{name}_Insure.exe
326 >        \@cp $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
327 > $$hashref{name}:$$hashref{name}_d.exe
328 >        \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
329 > $$hashref{name}_o:$$hashref{name}_o.exe
330 >        \@mv $$hashref{name}_o.exe \$(binarystore)/$$hashref{name}
331 > binfiles+=$$hashref{file}
332 > ENDTEXT
333 >        }
334 >        close binGNUmakefile;
335 > }
336 >
337 > sub Ext_start_export {
338 >        my $name=shift;
339 >        my @vars=@_;
340 >        my $hashref;
341 >        
342 >        $hashref=$switch->SetupValueHash(\@vars);
343 >        if ( $Arch ) {
344 >         if ( $switchex->context('export') ) {
345 >          $$hashref{'ref'}=~tr[A-Z][a-z];
346 >          print GNUmakefile $$hashref{'ref'};
347 >          if ( defined $$hashref{'version'} ) {
348 >                print GNUmakefile "_V_".$$hashref{'version'};
349 >          }
350 >          print GNUmakefile "=true\n";
351 >         }
352 >        }
353   }
354  
355   sub External_StartTag {
# Line 121 | Line 358 | sub External_StartTag {
358          my $hashref;
359          
360          $hashref=$switch->SetupValueHash(\@vars);
361 +        if ( $Arch ) {
362 +        $$hashref{'ref'}=~tr[A-Z][a-z];
363          print GNUmakefile $$hashref{'ref'};
364          if ( defined $$hashref{'version'} ) {
365                  print GNUmakefile "_V_".$$hashref{'version'};
366          }
367          print GNUmakefile "=true\n";
368 +        }
369          
370   }      
371  
# Line 136 | Line 376 | sub Group_start {
376          
377          $hashref=$switch->SetupValueHash(\@vars);
378          $switch->checkparam($hashref, $name, 'name');
379 +        if ( $Arch ) {
380          print GNUmakefile "GROUP_".$$hashref{'name'};
381          if ( defined $$hashref{'version'} ) {
382                  print GNUmakefile "_V_".$$hashref{'version'};
383          }
384          print GNUmakefile "=true\n";
385 +        }
386   }      
387  
388   sub External {
# Line 167 | Line 409 | sub Use_start {
409          
410          $hashref=$switch->SetupValueHash(\@vars);
411          $switch->checkparam($hashref, $name, "name");
412 <        if ( $filename=checkfile("$ENV{INTsrc}/$$hashref{name}/BuildFile")
413 <                                                 ne "" ) {
414 <          print GNUmakefile "ReqDependencies += $filename\n";
412 >        if ( $Arch ) {
413 >        $filename=SCRAMUtils::checkfile(
414 >                "$ENV{INTsrc}/$$hashref{name}/BuildFile");
415 >        if ( $filename ne "" ) {
416 >          ParseBuildFile_Export( $filename );
417 >        }
418          }
174        print GNUmakefile "local__$$hashref{name}=true\n";
419   }
420  
421   sub CheckBuildFile {
# Line 204 | Line 448 | sub AssociateGroup {
448          }
449   }
450  
451 + sub ignoretag {
452 +        my $name=shift;
453 +        my @vars=@_;
454 +        
455 +        $Arch=0;
456 +        push @ARCHBLOCK, $Arch;
457 + }
458 +
459 + sub ignoretag_end {
460 +        my $name=shift;
461 +        my @vars=@_;
462 +        
463 +        pop @ARCHBLOCK;
464 +        $Arch=$ARCHBLOCK[$#ARCHBLOCK];
465 + }
466 +
467 + sub Arch_Start {
468 +        my $name=shift;
469 +        my @vars=@_;
470 +        my $hashref;
471 +
472 +        $hashref=$toolswitch->SetupValueHash( \@vars );
473 +        $toolswitch->checkparam($hashref, $name, 'name');
474 +        #( ($$hashref{name}=~/$ENV{SCRAM_ARCH}/) )?$Arch=1:$Arch=0;
475 +        ( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($Arch=1) : ($Arch=0);
476 +        push @ARCHBLOCK, $Arch;
477 + }
478 + sub Arch_End {
479 +        my $name=shift;
480 +        my @vars=@_;
481 +
482 +        pop @ARCHBLOCK;
483 +        $Arch=$ARCHBLOCK[$#ARCHBLOCK];
484 + }
485 +
486   # Split up the Class Block String into a useable array
487   sub _CutBlock {
488      my $string= shift @_;
# Line 214 | Line 493 | sub OutToMakefile {
493          my $name=shift;
494          my @vars=@_;
495  
496 <        print GNUmakefile @vars;
496 >        if ( $Arch ) {
497 >          print GNUmakefile @vars;
498 >        }
499 > }
500 > sub OutToScreen {
501 >        my $name=shift;
502 >        my @vars=@_;
503 >
504 >        if ( $Arch ) {
505 >          print @vars;
506 >        }
507   }
508   sub setBlockClassPath {
509          my $name=shift;
# Line 226 | Line 515 | sub setBlockClassPath {
515          $BlockClassPath=$BlockClassPath.":".$$hashref{path};
516          _CutBlock($$hashref{path});
517   }
518 +
519 + sub use_export_start {
520 + #Set up a toolfile object
521 +        $exporttool=Tool->new();
522 + }
523 +
524 + sub use_export_end {
525 + #Write toolfile object to disk
526 +        $exporttool->envtomake(\*GNUmakefile);
527 + }
528 +
529 + sub export_start {
530 +        my $name=shift;
531 +        my @vars=@_;
532 +        my $hashref;
533 +
534 +        $hashref=$switch->SetupValueHash(\@vars);
535 +        if ( exists $$hashref{autoexport} ) {
536 +           print GNUmakefile "scram_autoexport=".$$hashref{autoexport}."\n";
537 +        }
538 + #Set up a toolfile object
539 +        print GNUmakefile "ifeq (\$(scram_autoexport),true)\n";
540 + }
541 +
542 + sub export_end {
543 + #Write toolfile object to disk
544 +        print GNUmakefile "endif\n";
545 + }
546 +
547 + #
548 + # Export Mode Lib Tag
549 + #
550 + sub lib_start_export {
551 +        my $name=shift;
552 +        my @vars=@_;
553 +        my $hashref;
554 +
555 +        $hashref=$switchex->SetupValueHash( \@vars );
556 +        $switchex->checkparam($hashref, $name, 'name');
557 +        if ( $Arch ) {
558 +         if ( $switchex->context('export') ) {
559 +                #If export mode then add this env to the export tool
560 +                $exporttool->addenv('lib',$$hashref{name});
561 +         }
562 +        }
563 + }
564 +
565 + #
566 + # Standard lib tag
567 + #
568 + sub lib_start {
569 +        my $name=shift;
570 +        my @vars=@_;
571 +        my $hashref;
572 +
573 +        $hashref=$switch->SetupValueHash( \@vars );
574 +        $switch->checkparam($hashref, $name, 'name');
575 +        if ( $Arch ) {
576 +           print GNUmakefile "lib+=$$hashref{name}\n";
577 +        }
578 + }
579 +
580 + #
581 + # libtype specification
582 + #
583 + sub LibType_Start {
584 +        my $name=shift;
585 +        my @vars=@_;
586 +        my $hashref;
587 +
588 +        if ( $Arch ) {
589 +        $hashref=$switch->SetupValueHash( \@vars );
590 +        $switch->checkparam($hashref, $name, 'type');
591 +        
592 +        print GNUmakefile "# Specify Library Type\n";
593 +        print GNUmakefile "DefaultLibsOff=yes\n";
594 +        if ( $$hashref{'type'}=~/^archive/i ) {
595 +          print GNUmakefile "LibArchive=true\n";
596 +        }
597 +        elsif ($$hashref{'type'}=~/debug_archive/i ) {
598 +          print GNUmakefile "LibDebugArchive=true\n";
599 +        }
600 +        elsif ($$hashref{'type'}=~/debug_shared/i ) {
601 +          print GNUmakefile "LibDebugShared=true\n";
602 +        }
603 +        elsif ($$hashref{'type'}=~/shared/i ) {
604 +          print GNUmakefile 'LibShared=true'."\n";
605 +        }
606 +        print GNUmakefile "\n";
607 +        }
608 + }
609 + sub LibType_text {
610 +        my $name=shift;
611 +        my @vars=@_;
612 +
613 +        if ( $Arch ) {
614 +          print GNUmakefile "libmsg::\n\t\@echo Library info: ";
615 +          print GNUmakefile @vars;
616 +          print GNUmakefile "\n";
617 +        }
618 + }
619 +
620 + sub Environment_start {
621 +        my $name=shift;
622 +        my @vars=@_;
623 +        my $hashref;
624 +
625 +        if ( $Arch ) {
626 +          $envnum++;
627 +
628 +          # open a new Environment File
629 +          my $envfile="$ENV{LOCALTOP}/$ENV{INTwork}/${path}/Env_$envnum.mk";
630 +          use FileHandle;
631 +          my $fh=FileHandle->new();
632 +          open ($fh,">$envfile") or die "Unable to open file $envfile \n$!\n";
633 +          push @filehandlestack, $fh;
634 +          *GNUmakefile=$fh;
635 +
636 +          # include the approprate environment file
637 +          if ( $envlevel == 0 ) {
638 +             print GNUmakefile "include $ENV{LOCALTOP}/$ENV{INTwork}/${path}/".
639 +                                "BuildFile.mk\n";
640 +          }
641 +          else {
642 +             print GNUmakefile "include $ENV{LOCALTOP}/$ENV{INTwork}/${path}/".
643 +                                "Env_$Envlevels[$envlevel]\.mk\n";
644 +          }
645 +          $envlevel++;
646 +          $Envlevels[$envlevel]=$envnum;
647 +          $currentenv="$ENV{LOCALTOP}/$ENV{INTwork}/${path}/Env_$envnum.mk";
648 +        }
649 + }
650 +
651 + sub Environment_end {
652 +        my $fd;
653 +
654 +        if ( $Arch ) {
655 +          $envlevel--;
656 +          if ( $envlevel < 0 ) {
657 +            print "Too many </Environent> Tags on $switch->line()\n";
658 +            exit;
659 +          }
660 +          close GNUmakefile;
661 +          # restore the last filehandle
662 +          $fd=pop @filehandlestack;
663 +          close $fd;
664 +          *GNUmakefile=$filehandlestack[$#filehandlestack];
665 +          if ( $envlevel < 1 ) {
666 +            $currentenv="$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk";
667 +          }
668 +          else {
669 +            $currentenv=
670 +             "$ENV{LOCALTOP}/$ENV{INTwork}/${path}/Env_$Envlevels[$envlevel]";
671 +          }
672 +        }
673 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines