ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/BuildFile.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/BuildFile.pm (file contents):
Revision 1.4 by williamc, Tue Sep 12 13:01:39 2000 UTC vs.
Revision 1.17 by sashby, Tue May 14 10:21:19 2002 UTC

# Line 2 | Line 2
2   #
3   # Interface
4   # ---------
5 < # new(ConfigArea)
5 > # new(toolbox)
6   # ParseBuildFile($base,$path,$file)
7   # ParseBuildFileExport(filename)
8   # BlockClassPath() : Return the class path
9   # ignore()      : return 1 if directory should be ignored 0 otherwise
10  
11   package BuildSystem::BuildFile;
12 + use Utilities::Verbose;
13   use ActiveDoc::SimpleDoc;
14   use BuildSystem::ToolBox;
15   require 5.004;
16 + @ISA=qw(Utilities::Verbose);
17  
18   BEGIN {
19   $buildfile="BuildFile";
# Line 21 | Line 23 | sub new {
23          my $class=shift;
24          my $self={};
25          bless $self, $class;
26 <        $self->{area}=shift;
25 <        $self->{toolbox}=$self->{area}->toolbox();
26 >        $self->{toolbox}=shift;
27          $self->{Arch}=1;
28          push @{$self->{ARCHBLOCK}}, $self->{Arch};
29          return $self;
# Line 30 | Line 31 | sub new {
31  
32   sub ignore {
33          my $self=shift;
34 +        $self->verbose(">> ignore......<<");
35 +        
36          return (defined $self->{ignore})?$self->{ignore}:0;
37   }
38  
# Line 37 | Line 40 | sub _initswitcher {
40          my $self=shift;
41          my $switch=ActiveDoc::SimpleDoc->new();
42          my $parse="makebuild";
43 +        $self->verbose(">> _initswitcher: <<");
44          $switch->newparse($parse);
45          $switch->addignoretags($parse);
46          $self->_commontags($switch,$parse);
# Line 49 | Line 53 | sub _initswitcher {
53                                          \&Bin_start,$self,
54                                          \&OutToScreen, $self,
55                                          "", $self);
56 +         $switch->addtag($parse,"ProductStore",
57 +                                        \&Store_start,$self,
58 +                                        "", $self,
59 +                                        "", $self);
60          $switch->addtag($parse,"LibType",
61                                          \&LibType_Start,$self,
62                                          \&LibType_text, $self,
# Line 80 | Line 88 | sub _commontags {
88          my $self=shift;
89          my $switch=shift;
90          my $parse=shift;
91 <
91 >        
92 >        $self->verbose(">> _commontags: SW ".$switch." PARSE ".$parse." <<");
93 >        
94          $switch->grouptag("Export",$parse);
95          $switch->addtag($parse,"Use",\&Use_start,$self,
96                                                 \&OutToMakefile, $self,
# Line 108 | Line 118 | sub _commontags {
118          return $switch;
119   }
120  
111 sub GenerateMakefile {
112        my $self=shift;
113        my $infile=shift;
114        my $outfile=shift;
115
116        $self->{switch}=$self->_initswitcher();
117        $self->{switch}->filetoparse($infile);
118
119        # open a temporary gnumakefile to store output.
120        my $fh=FileHandle->new();
121        open ( $fh, ">$outfile") or die "Unable to open $outfile for output ".
122                                                                "$!\n";
123        @{$self->{filehandlestack}}=($fh);
124
125        #  -- make an alias
126        *GNUmakefile=$fh;
127        if ( -e $ENV{LatestBuildFile} ) {
128          print GNUmakefile "include $ENV{LatestBuildFile}\n";
129        }
130        $ENV{LatestBuildFile}=$outfile;
131        $self->{switch}->parse("makebuild"); # sort out supported tags
132        close GNUmakefile;
133 }
134
121   sub ParseBuildFile {
122          my $self=shift;
123          my $base=shift;
# Line 144 | Line 130 | sub ParseBuildFile {
130          else {
131           $fullfilename=$filename;
132          }
133 +
134 +        $self->verbose(">> ParseBuildFile: FN ".$fullfilename." <<");
135 +        
136          $self->{path}=$path;
148        #print "Processing $fullfilename\n";
137          $numbins=0;
138          $self->{envnum}=0;
139          $self->{envlevel}=0;
# Line 154 | Line 142 | sub ParseBuildFile {
142          $self->{switch}=$self->_initswitcher();
143          $self->{switch}->filetoparse($fullfilename);
144  
145 < #       $self->{switch}->{Strict_no_cr}='no';
158 <        #open a temporary gnumakefile to store output.
145 >        # open a temporary gnumakefile to store output.
146          use Utilities::AddDir;
147          AddDir::adddir("$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}");
148          my $fh=FileHandle->new();
149          open ( $fh, ">$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/BuildFile.mk"
150 <          ) or die 'Unable to open /$ENV{INTwork}/".$self->{path}."/BuildFile.mk $!\n';
150 >          ) or die "Unable to open /$ENV{INTwork}/".$self->{path}."/BuildFile.mk $!\n";
151          @{$self->{filehandlestack}}=($fh);
152          # make an alias
153          *GNUmakefile=$fh;
154          if ( -e $ENV{LatestBuildFile} ) {
155            print GNUmakefile "include $ENV{LatestBuildFile}\n";
156          }
157 < #       print "writing to :\n".
171 < #               "$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/BuildFile.mk\n";
157 >
158          $ENV{LatestBuildFile}="$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/BuildFile.mk";
159          $self->{switch}->parse("makebuild"); # sort out supported tags
160          if ( $numbins > 0 ) {
# Line 194 | Line 180 | ENDTEXT
180   sub ParseBuildFile_Export {
181          my $self=shift;
182          my $filename=shift;
183 <        my $bf=BuildSystem::BuildFile->new($self->{area});
183 >
184 >        $self->verbose(">> ParseBuildFile_Export: FN ".$filename." <<");
185 >        
186 >        my $bf=BuildSystem::BuildFile->new($self->{toolbox});
187          if ( defined $self->{remoteproject} ) {
188             $bf->{remoteproject}=$self->{remoteproject};
189          }
# Line 205 | Line 194 | sub ParseBuildFile_Export {
194   sub _location {
195          my $self=shift;
196          use File::Basename;
197 <
197 >        $self->verbose(">> _location: <<");
198          return dirname($self->{switch}->filetoparse());
199   }
200  
201   sub _parseexport {
202          my $self=shift;
203          my $filename=shift;
204 <
204 >        $self->verbose(">> _parseexport: FN ".$filename." <<");
205 >        
206          my $switchex=ActiveDoc::SimpleDoc->new();
207          $switchex->filetoparse($filename);
208          $switchex->newparse("export");
# Line 223 | Line 213 | sub _parseexport {
213                                          \&export_end_export,$self);
214          $self->_commontags($switchex,"export");
215          $switchex->allowgroup("__export","export");
226 #       $switchex->{Strict_no_cr}='no';
216          $self->{switch}=$switchex;
217          $switchex->parse("export"); # sort out supported tags
218   }
# Line 231 | Line 220 | sub _parseexport {
220   sub _pushremoteproject {
221          my $self=shift;
222          my $path=shift;
223 +
224 +        $self->verbose(">> _pushremoteproject: PATH ".$path." <<");
225          
226          if ( defined $self->{remoteproject} ) {
227            push @{$self->{rpstack}}, $self->{remoteproject};
# Line 240 | Line 231 | sub _pushremoteproject {
231  
232   sub _popremoteproject {
233          my $self=shift;
234 +        $self->verbose(">> _popremoteproject:  <<");
235 +        
236          if ( $#{$self->{rpstack}} >=0 ) {
237            $self->{remoteproject}=pop @{$self->{rpstack}};
238          }
# Line 250 | Line 243 | sub _popremoteproject {
243  
244   sub _toolmapper {
245          my $self=shift;
246 +
247          if ( ! defined $self->{mapper} ) {
248             require BuildSystem::ToolMapper;
249             $self->{mapper}=BuildSystem::ToolMapper->new();
250          }
251 +        $self->verbose(">> _toolmapper: TM ".$self->{mapper}."<<");
252          return $self->{mapper};
253   }
254  
# Line 267 | Line 262 | sub Class_StartTag {
262          my $self=shift;
263          my $name=shift;
264          my $hashref=shift;
265 +
266 +        $self->verbose(">> Classs_StartTag: NM ".$name." <<");
267          
268          if ( $self->{Arch} ) {
269           if ( defined $$hashref{'type'} ) {
# Line 275 | Line 272 | sub Class_StartTag {
272          }
273   }
274  
275 < sub IncludePath_Start {
276 <        my $self=shift;
277 <        my $name=shift;
278 <        my $hashref=shift;
279 <
280 <        $self->{switch}->checktag( $name, $hashref, 'path');
281 <        if ( $self->{Arch} ) {
282 <          print GNUmakefile "INCLUDE+=".$self->_location()."/".
283 <                                                $$hashref{'path'}."\n";
284 <        }
285 < }
275 > sub IncludePath_Start
276 >   {
277 >   my $self=shift;
278 >   my $name=shift;
279 >   my $hashref=shift;
280 >  
281 >   $self->verbose(">> IncludePath_Start: NM ".$name." <<");
282 >  
283 >   $self->{switch}->checktag( $name, $hashref, 'path');
284 >   if ( $self->{Arch} )
285 >      {
286 >      print GNUmakefile "INCLUDE:=\$(filter-out ".$self->_location()."/".$$hashref{'path'}.",\$(INCLUDE))","\n";
287 >      print GNUmakefile "INCLUDE+=".$self->_location()."/".$$hashref{'path'}."\n";
288 >      }
289 >   }
290  
291   #
292   # generic build tag
# Line 295 | Line 296 | sub Build_start {
296          my $name=shift;
297          my $hashref=shift;
298  
299 +        $self->verbose(">> Build_start: NM ".$name." <<");
300 +        
301          $self->{switch}->checktag($name,$hashref,'class');
302          if ( $self->{Arch} ) {
303  
# Line 305 | Line 308 | sub Build_start {
308            }
309            else {
310              $self->{switch}->parseerror("No name specified for build product");
308            #$name="\$(buildname)";
311            }
312  
313            # -- check we have a lookup for the class type
# Line 345 | Line 347 | sub Build_start {
347              my $dirname=$$hashref{'class'}."_".$type."_".$name;
348              my $here="$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/".$dirname;
349              my $makefile=$here."/BuildFile.mk";
348 #           AddDir::adddir($here);
350  
351              # -- create link targets to the directory
352              push @targets, $dirname;
# Line 377 | Line 378 | sub Build_start {
378              }
379              print $fh "\tfi\n";
380              print $fh "\n";
380 #           print $typefile "$name :\n";
381 #           print $typefile "\t\$(_quietbuild_)";
382 #           print $typefile $mapper->template($$hashref{'class'},$type)."\n";
383 #           print $typefile "\t\$(_quietstamp_)";
384 #           print $typefile "$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$@.ds \$@ \$^\n";
381  
382              # -- cleaning targets
383              push @targets, "clean_$dirname";
# Line 422 | Line 418 | sub Bin_start {
418          my $tool;
419          my $filename;
420          my $objectname;
421 +
422 +        $self->verbose(">>          <<");
423          
424          $self->{switch}->checktag($name,$hashref,'file');
425          if ( $self->{Arch} ) {
# Line 539 | Line 537 | ENDTEXT
537          print binGNUmakefile "$$hashref{name}_Insure.exe:.psrc\n";
538          print binGNUmakefile "$$hashref{name}_d.exe:$objectname_d\n";
539          print binGNUmakefile "\t\$(CClinkCmdDebug)\n";
540 <        print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
540 >        print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
541          print binGNUmakefile "$$hashref{name}_l_d.exe:$objectname_d\n";
542          print binGNUmakefile "\t\$(CClinkCmdDebugLocal)\n";
543 <        print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
543 >        print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
544          print binGNUmakefile "$$hashref{name}_Insure.exe:$objectname_Insure\n";
545          print binGNUmakefile "\t\$(CClinkCmdInsure)\n";
546 <        print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
546 >        print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
547          print binGNUmakefile "$$hashref{name}_o.exe:$objectname_o\n";
548          print binGNUmakefile "\t\$(CClinkCmd)\n";
549 <        print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
549 >        print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
550          print binGNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
551          print binGNUmakefile "-include $$hashref{name}.dep\n";
552   print binGNUmakefile <<ENDTEXT;
# Line 584 | Line 582 | sub External_StartTag {
582          my $self=shift;
583          my $name=shift;
584          my $hashref=shift;
585 +
586 +        $self->verbose(">> External_StartTag: NM ".$name." <<");
587          
588          my $tool;
589          if ( $self->{Arch} ) {
# Line 637 | Line 637 | sub Group_start {
637          my $name=shift;
638          my $hashref=shift;
639          
640 +        $self->verbose(">> Group_start: NM ".$name." <<");
641 +        
642          $self->{switch}->checktag($name, $hashref, 'name');
643          if ( $self->{Arch} ) {
644          print GNUmakefile "GROUP_".$$hashref{'name'};
# Line 647 | Line 649 | sub Group_start {
649          }
650   }      
651  
652 < sub Use_start {
653 <        my $self=shift;
654 <        my $name=shift;
655 <        my $hashref=shift;
656 <        my $filename;
657 <        use Utilities::SCRAMUtils;
658 <        
659 <        $self->{switch}->checktag($name, $hashref, "name");
660 <        if ( $self->{Arch} ) {
661 <        if ( exists $$hashref{'group'} ) {
662 <          print GNUmakefile "GROUP_".$$hashref{'group'}."=true\n";
663 <        }
664 <        if ( ! defined $self->{remoteproject} ) {
665 <          $filename=SCRAMUtils::checkfile(
666 <                "/$ENV{INTsrc}/$$hashref{name}/BuildFile");
667 <        }
668 <        else {
669 <          $filename=$self->{remoteproject}."/$$hashref{name}/BuildFile";
670 <        print "trying $filename\n";
671 <          if ( ! -f $filename ) { $filename=""; };
672 <        }
673 <        if ( $filename ne "" ) {
674 <          $self->ParseBuildFile_Export( $filename );
675 <        }
676 <        else {
677 <           $self->{switch}->parseerror("Unable to detect Appropriate ".
678 <                "decription file for <$name name=".$$hashref{name}.">");
679 <        }
680 <        }
681 < }
652 > sub Use_start
653 >   {
654 >   my $self=shift;
655 >   my $name=shift;
656 >   my $hashref=shift;
657 >   my $filename;
658 >   use Utilities::SCRAMUtils;
659 >
660 >   $self->verbose(">> Use_start: NM ".$name." <<");
661 >  
662 >   $self->{switch}->checktag($name, $hashref, "name");
663 >   if ( $self->{Arch} )
664 >      {
665 >      if ( exists $$hashref{'group'} )
666 >         {
667 >         print GNUmakefile "GROUP_".$$hashref{'group'}."=true\n";
668 >         }
669 >      if ( ! defined $self->{remoteproject} )
670 >         {
671 >         $filename=SCRAMUtils::checkfile("/$ENV{INTsrc}/$$hashref{name}/BuildFile");
672 >         }
673 >      else
674 >         {
675 >         $filename=$self->{remoteproject}."/$$hashref{name}/BuildFile";
676 >         print "Trying $filename\n";
677 >         if ( ! -f $filename ) { $filename=""; };
678 >         }
679 >      if ( $filename ne "" )
680 >         {
681 >         $self->ParseBuildFile_Export( $filename );
682 >         }
683 >      else
684 >         {
685 >         $self->{switch}->parseerror("Unable to detect Appropriate ".
686 >                                     "decription file for <$name name=".$$hashref{name}.">");
687 >         }
688 >      }
689 >   }
690  
691   sub CheckBuildFile {
692           my $self=shift;
693           my $classdir=shift;
694           my $ClassName="";
695           my $thisfile="$classdir/$buildfile";
696 <
696 >        
697           if ( -e $ENV{LOCALTOP}."/".$thisfile ) {
698              $DefaultBuildfile="$ENV{LOCALTOP}/$thisfile";
699              $self->ParseBuildFile($ENV{LOCALTOP}, $classdir, $buildfile);
# Line 692 | Line 702 | sub CheckBuildFile {
702              $DefaultBuildfile="$ENV{RELEASETOP}/$thisfile";
703              $self->ParseBuildFile($ENV{RELEASETOP}, $classdir, $buildfile);
704           }
705 +         $self->verbose(">> CheckBuildFile: FN ".$thisfile." CN ".$ClassName." <<");
706           return $ClassName;
707   }
708  
# Line 703 | Line 714 | sub AssociateGroup {
714          my $string=shift;
715          my $word;
716  
717 +        $self->verbose(">> AssociateGroup: NM ".$name." ST ".$string." <<");
718 +        
719          if ( $self->{Arch} ) {
720          foreach $word ( (split /\s/, $string) ){
721                  chomp $word;
# Line 719 | Line 732 | sub Arch_Start {
732          my $name=shift;
733          my $hashref=shift;
734  
735 +        $self->verbose(">> Arch_Start: NM ".$name." <<");
736 +        
737          $self->{switch}->checktag($name, $hashref,'name');
738          ( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($self->{Arch}=1)
739                                                  : ($self->{Arch}=0);
# Line 728 | Line 743 | sub Arch_Start {
743   sub Arch_End {
744          my $self=shift;
745          my $name=shift;
746 +        
747 +        $self->verbose(">> Arch_End: NM ".$name." <<");
748  
749 <        pop @{$self->{ARCHBLOCK}};
749 >        pop @{$self->{ARCHBLOCK}};
750          $self->{Arch}=$self->{ARCHBLOCK}[$#{$self->{ARCHBLOCK}}];
751   }
752  
# Line 737 | Line 754 | sub Arch_End {
754   sub _CutBlock {
755      my $self=shift;
756      my $string= shift @_;
757 +
758 +    $self->verbose(">> _CutBlock: ST ".$string." <<");
759 +    
760      @BlockClassA = split /\//, $string;
761   }
762  
# Line 744 | Line 764 | sub OutToMakefile {
764          my $self=shift;
765          my $name=shift;
766          my @vars=@_;
767 +        
768 +        $self->verbose(">> OutToMakefile: <<");
769  
770          if ( $self->{Arch} ) {
771 +          $self->verbose(">> CONT: ".$#vars." lines <<");
772            print GNUmakefile @vars;
773          }
774   }
# Line 753 | Line 776 | sub OutToMakefile {
776   sub OutToScreen {
777          my $name=shift;
778          my @vars=@_;
779 <
779 >        
780          if ( $self->{Arch} ) {
781            print @vars;
782          }
# Line 763 | Line 786 | sub setBlockClassPath {
786          my $name=shift;
787          my $hashref=shift;
788  
789 +        $self->verbose(">> setBlockClassPath: NM ".$name." <<");
790 +        
791          $self->{switch}->checktag($name, $hashref, 'path');
792          $self->{BlockClassPath}=$self->{BlockClassPath}.":".$$hashref{path};
793          $self->_CutBlock($$hashref{path});
# Line 770 | Line 795 | sub setBlockClassPath {
795  
796   sub BlockClassPath {
797          my $self=shift;
798 +
799 +        $self->verbose(">> BlockClassPath: <<");
800 +
801          return $self->{BlockClassPath};
802   }
803  
# Line 778 | Line 806 | sub export_start_export {
806          my $name=shift;
807          my $hashref=shift;
808  
809 +        $self->verbose(">> export_start_export: NM ".$name." <<");
810 +        
811          $self->{switch}->opengroup("__export");
812   }
813  
# Line 786 | Line 816 | sub export_start {
816          my $name=shift;
817          my $hashref=shift;
818  
819 +        $self->verbose(">> export_start: NM ".$name." <<");
820 +        
821          $self->{switch}->opengroup("__export");
822          if ( exists $$hashref{autoexport} ) {
823            print GNUmakefile "scram_autoexport=".$$hashref{autoexport}."\n";
# Line 802 | Line 834 | sub export_start {
834  
835   sub export_end_export {
836          my $self=shift;
837 +        $self->verbose(">> export_end_export: <<");
838          $self->{switch}->closegroup("__export");
839   }
840  
841   sub export_end {
842          my $self=shift;
843 +        $self->verbose(">> export_end: <<");
844          $self->{switch}->closegroup("__export");
845          print GNUmakefile "endif\n";
846   }
# Line 814 | Line 848 | sub export_end {
848   #
849   # Standard lib tag
850   #
851 < sub lib_start {
852 <        my $self=shift;
853 <        my $name=shift;
854 <        my $hashref=shift;
855 <
856 <        $self->{switch}->checktag($name, $hashref, 'name');
857 <        if ( $self->{Arch} ) {
858 <           print GNUmakefile "lib+=$$hashref{name}\n";
859 <        }
860 < }
851 > sub lib_start
852 >   {
853 >   my $self=shift;
854 >   my $name=shift;
855 >   my $hashref=shift;
856 >  
857 >   $self->verbose(">> lib_start: NM ".$name." <<");
858 >  
859 >   $self->{switch}->checktag($name, $hashref, 'name');
860 >
861 >   if ( $self->{Arch} )
862 >      {
863 >      print GNUmakefile "lib+=$$hashref{name}\n";
864 >      }
865 >   }
866  
867   #
868   # libtype specification
# Line 832 | Line 871 | sub LibType_Start {
871          my $self=shift;
872          my $name=shift;
873          my $hashref=shift;
874 <
874 >        
875 >        $self->verbose(">> LibType_Start: NM ".$name." <<");
876 >        
877          if ( $self->{Arch} ) {
878          if ( defined $self->{libtype_conext} ) {
879            $self->{switch}->parseerror("<$name> tag cannot be specified".
# Line 865 | Line 906 | sub LibType_text {
906          my $self=shift;
907          my $name=shift;
908          my $string=shift;
909 +        $self->verbose(">> LibType_text: NM ".$name." <<");
910  
911 <        if ( $self->{Arch} ) {
911 >        if ( $self->{Arch} ) {
912            $string=~s/\n/ /g;
913            print GNUmakefile "libmsg::\n\t\@echo Library info: ";
914            print GNUmakefile $string;
# Line 878 | Line 920 | sub LibType_end {
920          my $self=shift;
921          my $name=shift;
922  
923 +        $self->verbose(">> LibType_end: NM ".$name." <<");
924 +
925          undef $self->{libtype_conext};
926   }
927  
# Line 886 | Line 930 | sub Environment_start {
930          my $name=shift;
931          my $hashref=shift;
932  
933 +        $self->verbose(">> Environment_start: NM ".$name." <<");
934 +        
935          if ( $self->{Arch} ) {
936            $self->{envnum}++;
937  
# Line 917 | Line 963 | sub Environment_end {
963          my $self=shift;
964          my $fd;
965  
966 +        $self->verbose(">> Environment_end: NM ".$name." <<");
967 +
968          if ( $self->{Arch} ) {
969            $self->{envlevel}--;
970            if ( $self->{envlevel} < 0 ) {
# Line 939 | Line 987 | sub Environment_end {
987            }
988          }
989   }
990 +
991 + sub Store_start {
992 +        my $self=shift;
993 +        my $name=shift;
994 +        my $hashref=shift;
995 +
996 +        $self->verbose(">> Store_start: NM ".$name." <<");
997 +
998 +        if ( $self->{Arch} ) {
999 +          $self->{switch}->checktag( $name, $hashref, 'name' );
1000 +
1001 +          # -- store creation
1002 +          my $dir=$$hashref{'name'};
1003 +          AddDir::adddir($ENV{LOCALTOP}."/".$dir);
1004 +          if ( exists $$hashref{'type'} ) {
1005 +            # -- architecture specific store
1006 +            if ( $$hashref{'type'}=~/^arch/i ) {
1007 +                $dir=$dir."/".$ENV{SCRAM_ARCH};
1008 +                AddDir::adddir($ENV{LOCALTOP}."/".$dir);
1009 +            }
1010 +            else {
1011 +                $self->parseerror("Unknown type in <$name> tag");
1012 +            }
1013 +          }
1014 +
1015 +          # -- set make variables for the store
1016 +          print GNUmakefile "SCRAMSTORENAME_".$$hashref{'name'}.":=".$dir."\n";
1017 +          print GNUmakefile "SCRAMSTORE_".$$hashref{'name'}.":=".
1018 +                                        $ENV{LOCALTOP}."/".$dir."\n";
1019 +          print GNUmakefile "VPATH+=".$ENV{LOCALTOP}
1020 +                        ."/".$dir.":".$ENV{RELEASETOP}."/".$dir."\n";
1021 +        }
1022 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines