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.12 by williamc, Tue Nov 14 15:18:41 2000 UTC vs.
Revision 1.22 by sashby, Fri Oct 4 17:38:15 2002 UTC

# Line 2 | Line 2
2   #
3   # Interface
4   # ---------
5 < # new(ConfigArea,Builder)
5 > # new(toolbox)
6   # ParseBuildFile($base,$path,$file)
7   # ParseBuildFileExport(filename)
8 # BlockParse(Block) : perform a parse to modify the block
8   # BlockClassPath() : Return the class path
9   # ignore()      : return 1 if directory should be ignored 0 otherwise
11 # classname()   : get/set the associated class
12 # buildfile()   : get/set BuildFile location
13 # makefile()    : get the generated makefile
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 25 | Line 23 | sub new {
23          my $class=shift;
24          my $self={};
25          bless $self, $class;
26 <        $self->{area}=shift;
29 <        $self->{Builder}=shift;
30 <        $self->{toolbox}=$self->{area}->toolbox();
31 <        $self->{localtop}=$self->{area}->location();
32 <        # -- set RELEASTOP
33 <        my $rarea=$self->{area}->linkarea();
34 <        if ( ! defined $rarea ) {
35 <          $self->{releasetop}=$self->{localtop};
36 <        }
37 <        else {
38 <          $self->{releasetop}=$rarea->location();
39 <        }
40 <        $self->{releasetop}=$self->{area}->location();
26 >        $self->{toolbox}=shift;
27          $self->{Arch}=1;
28          push @{$self->{ARCHBLOCK}}, $self->{Arch};
29          return $self;
30   }
31  
46 sub buildfile {
47        my $self=shift;
48        if ( @_ ) {
49          $self->{buildfile}=shift;
50        }
51        return $self->{buildfile};
52 }
53
54 sub makefile {
55        my $self=shift;
56        if ( @_ ) {
57          $self->{makefile}=shift;
58        }
59        return $self->{makefile};
60 }
61
62 sub BlockParse {
63        my $self=shift;
64        $self->{block}=shift;
65
66        # -- set up the block parse
67        my $switch=$self->_initswitcher();
68        my $parse="block";
69        $switch->newparse($parse);
70        $switch->addignoretags($parse);
71        $switch->addtag($parse,"BuildParam", \&BuildBlock_start, $self);
72        $switch->filetoparse($self->buildfile());
73
74        # -- parse away
75        $self->{switch}=$switch;
76        $switch->parse("block");
77 }
78
79 sub Parsetofh {
80        my $self=shift;
81        my $fh=shift;
82        $self->{buildblock}=shift;
83
84        # -- set up for parse
85        @{$self->{filehandlestack}}=($fh);
86        $self->{switch}->filetoparse($self->buildfile());
87        *GNUmakefile=$fh;
88
89        # -- generate makefile
90        $self->{switch}->parse("makebuild"); # sort out supported tags
91
92        # -- Clean up
93        close GNUmakefile;
94 }
95
32   sub ignore {
33          my $self=shift;
34 +        $self->verbose(">> ignore......<<");
35 +        
36          return (defined $self->{ignore})?$self->{ignore}:0;
37   }
38  
# Line 102 | 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);
47 <        #$switch->addtag($parse,"Build", \&Build_start, $self);
47 >        $switch->addtag($parse,"Build", \&Build_start, $self);
48          $switch->addtag($parse,"none",
49                                          \&OutToMakefile,$self,
50                                          \&OutToMakefile, $self,
# Line 114 | Line 53 | sub _initswitcher {
53                                          \&Bin_start,$self,
54                                          \&OutToScreen, $self,
55                                          "", $self);
56 <         $switch->addtag($parse,"ProductStore",
56 >        $switch->addtag($parse,"Module",
57 >                                        \&Module_start,$self,
58 >                                        \&OutToScreen, $self,
59 >                                        "", $self);
60 >
61 >        $switch->addtag($parse,"ProductStore",
62                                          \&Store_start,$self,
63                                          "", $self,
64                                          "", $self);
# Line 145 | Line 89 | sub _initswitcher {
89          return $switch;
90   }
91  
92 < sub _commontags {
93 <        my $self=shift;
94 <        my $switch=shift;
95 <        my $parse=shift;
96 <
97 <        $switch->grouptag("Export",$parse);
98 <        $switch->addtag($parse,"Use",\&Use_start,$self,
99 <                                               \&OutToMakefile, $self,
100 <                                                "", $self);
101 <        $switch->addtag($parse,"Group",\&Group_start,$self,
102 <                                               \&OutToMakefile, $self,
103 <                                                "", $self);
104 <        $switch->grouptag("Group",$parse);
105 <        $switch->addtag($parse,"External",
106 <                                        \&External_StartTag,$self,
107 <                                        \&OutToMakefile, $self,
108 <                                        "", $self);
109 <        $switch->addtag($parse,"lib",
110 <                                        \&lib_start,$self,
111 <                                        \&OutToMakefile, $self,
112 <                                        "", $self);
113 <        $switch->addtag($parse,"Architecture",
114 <                                        \&Arch_Start,$self,
115 <                                        \&OutToMakefile, $self,
116 <                                        \&Arch_End,$self);
117 <        $switch->addtag($parse,"INCLUDE_PATH",
118 <                                        \&IncludePath_Start,$self,
119 <                                        \&OutToMakefile, $self,
120 <                                        "",$self);
121 <        return $switch;
122 < }
123 <
124 < sub GenerateMakefile {
125 <        my $self=shift;
126 <        my $infile=shift;
127 <        my $outfile=shift;
128 <
129 <        $self->{switch}=$self->_initswitcher();
130 <        $self->{switch}->filetoparse($infile);
131 <
132 <        # open a temporary gnumakefile to store output.
133 <        my $fh=FileHandle->new();
134 <        open ( $fh, ">$outfile") or die "Unable to open $outfile for output ".
191 <                                                                "$!\n";
192 <        @{$self->{filehandlestack}}=($fh);
193 <
194 <        #  -- make an alias
195 <        *GNUmakefile=$fh;
196 <        if ( -e $ENV{LatestBuildFile} ) {
197 <          print GNUmakefile "include $ENV{LatestBuildFile}\n";
198 <        }
199 <        $self->{switch}->parse("makebuild"); # sort out supported tags
200 <        close GNUmakefile;
201 <        return $outfile;
202 < }
92 > sub _commontags
93 >   {
94 >   my $self=shift;
95 >   my $switch=shift;
96 >   my $parse=shift;
97 >  
98 >   $self->verbose(">> _commontags: SW ".$switch." PARSE ".$parse." <<");
99 >  
100 >   $switch->grouptag("Export",$parse);
101 >   $switch->addtag($parse,"Use",
102 >                   \&Use_start,$self,
103 >                   \&OutToMakefile, $self,
104 >                   "", $self);
105 >   $switch->addtag($parse,"Group",
106 >                   \&Group_start,$self,
107 >                   \&OutToMakefile, $self,
108 >                   "", $self);
109 >   $switch->grouptag("Group",$parse);
110 >   $switch->addtag($parse,"External",
111 >                   \&External_StartTag,$self,
112 >                   \&OutToMakefile, $self,
113 >                   "", $self);
114 >   $switch->addtag($parse,"lib",
115 >                   \&lib_start,$self,
116 >                   \&OutToMakefile, $self,"", $self);
117 >   $switch->addtag($parse,"debuglib",
118 >                   \&debuglib_start,$self,
119 >                   \&OutToMakefile, $self,
120 >                   "", $self);
121 >   $switch->addtag($parse,"Architecture",
122 >                   \&Arch_Start,$self,
123 >                   \&OutToMakefile, $self,
124 >                   \&Arch_End,$self);
125 >   $switch->addtag($parse,"INCLUDE_PATH",
126 >                   \&IncludePath_Start,$self,
127 >                   \&OutToMakefile, $self,
128 >                   "",$self);
129 >   $switch->addtag($parse,"CompilerMap",
130 >                   \&CompilerMap_Start,$self,
131 >                   \&OutToMakefile, $self,
132 >                   "",$self);
133 >   return $switch;
134 >   }
135  
136   sub ParseBuildFile {
137          my $self=shift;
# Line 213 | Line 145 | sub ParseBuildFile {
145          else {
146           $fullfilename=$filename;
147          }
148 +
149 +        $self->verbose(">> ParseBuildFile: FN ".$fullfilename." <<");
150 +        
151          $self->{path}=$path;
217        #print "Processing $fullfilename\n";
152          $numbins=0;
153          $self->{envnum}=0;
154          $self->{envlevel}=0;
155 <        $self->{makefile}="$self->{localtop}/$ENV{INTwork}/$self->{path}/".
156 <                                                                "BuildFile.mk";
223 <        $self->{currentenv}=$self->{makefile};
155 >        $self->{currentenv}="$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/".
156 >                                                                "BuildFile.mk";
157          $self->{switch}=$self->_initswitcher();
158          $self->{switch}->filetoparse($fullfilename);
159  
160 < #       $self->{switch}->{Strict_no_cr}='no';
228 <        #open a temporary gnumakefile to store output.
160 >        # open a temporary gnumakefile to store output.
161          use Utilities::AddDir;
162 <        AddDir::adddir("$self->{localtop}/$ENV{INTwork}/$self->{path}");
163 <        $ENV{LatestBuildFile}=$self->GenerateMakefile($fullfilename,
164 <        $self->{localtop}."/".$ENV{INTwork}."/".$self->{path}."/BuildFile.mk");
165 < }
162 >        AddDir::adddir("$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}");
163 >        my $fh=FileHandle->new();
164 >        open ( $fh, ">$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/BuildFile.mk"
165 >          ) or die "Unable to open /$ENV{INTwork}/".$self->{path}."/BuildFile.mk $!\n";
166 >        @{$self->{filehandlestack}}=($fh);
167 >        # make an alias
168 >        *GNUmakefile=$fh;
169 >        if ( -e $ENV{LatestBuildFile} ) {
170 >          print GNUmakefile "include $ENV{LatestBuildFile}\n";
171 >        }
172  
173 < sub classname {
174 <        my $self=shift;
175 <        if ( @_ ) {
176 <          $self->{classname}=shift;
177 <        }
178 <        return $self->{classname};
173 >        $ENV{LatestBuildFile}="$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/BuildFile.mk";
174 >        $self->{switch}->parse("makebuild"); # sort out supported tags
175 >        if ( $numbins > 0 ) {
176 >         print GNUmakefile <<ENDTEXT;
177 > ifndef BINMODE
178 > help::
179 > \t\@echo Generic Binary targets
180 > \t\@echo ----------------------
181 > endif
182 > ENDTEXT
183 >         foreach $target ( keys %$targettypes ) {
184 >         print GNUmakefile <<ENDTEXT;
185 > ifndef BINMODE
186 > help::
187 > \t\@echo $target
188 > endif
189 > ENDTEXT
190 >         }
191 >        }
192 >        close GNUmakefile;
193   }
194  
195   sub ParseBuildFile_Export {
196          my $self=shift;
197          my $filename=shift;
198 <        my $bf=BuildSystem::BuildFile->new($self->{area},$self->{Builder});
198 >
199 >        $self->verbose(">> ParseBuildFile_Export: FN ".$filename." <<");
200 >        
201 >        my $bf=BuildSystem::BuildFile->new($self->{toolbox});
202          if ( defined $self->{remoteproject} ) {
203             $bf->{remoteproject}=$self->{remoteproject};
204          }
# Line 254 | Line 209 | sub ParseBuildFile_Export {
209   sub _location {
210          my $self=shift;
211          use File::Basename;
212 <
212 >        $self->verbose(">> _location: <<");
213          return dirname($self->{switch}->filetoparse());
214   }
215  
216   sub _parseexport {
217          my $self=shift;
218          my $filename=shift;
219 <
219 >        $self->verbose(">> _parseexport: FN ".$filename." <<");
220 >        
221          my $switchex=ActiveDoc::SimpleDoc->new();
222          $switchex->filetoparse($filename);
223          $switchex->newparse("export");
# Line 272 | Line 228 | sub _parseexport {
228                                          \&export_end_export,$self);
229          $self->_commontags($switchex,"export");
230          $switchex->allowgroup("__export","export");
275 #       $switchex->{Strict_no_cr}='no';
231          $self->{switch}=$switchex;
232          $switchex->parse("export"); # sort out supported tags
233   }
# Line 280 | Line 235 | sub _parseexport {
235   sub _pushremoteproject {
236          my $self=shift;
237          my $path=shift;
238 +
239 +        $self->verbose(">> _pushremoteproject: PATH ".$path." <<");
240          
241          if ( defined $self->{remoteproject} ) {
242            push @{$self->{rpstack}}, $self->{remoteproject};
# Line 289 | Line 246 | sub _pushremoteproject {
246  
247   sub _popremoteproject {
248          my $self=shift;
249 +        $self->verbose(">> _popremoteproject:  <<");
250 +        
251          if ( $#{$self->{rpstack}} >=0 ) {
252            $self->{remoteproject}=pop @{$self->{rpstack}};
253          }
# Line 299 | Line 258 | sub _popremoteproject {
258  
259   sub _toolmapper {
260          my $self=shift;
261 +
262          if ( ! defined $self->{mapper} ) {
263             require BuildSystem::ToolMapper;
264             $self->{mapper}=BuildSystem::ToolMapper->new();
265          }
266 +        $self->verbose(">> _toolmapper: TM ".$self->{mapper}."<<");
267          return $self->{mapper};
268   }
269  
# Line 316 | Line 277 | sub Class_StartTag {
277          my $self=shift;
278          my $name=shift;
279          my $hashref=shift;
280 +
281 +        $self->verbose(">> Classs_StartTag: NM ".$name." <<");
282          
283          if ( $self->{Arch} ) {
284           if ( defined $$hashref{'type'} ) {
285 <                 $self->classname($$hashref{'type'});
285 >                $ClassName=$$hashref{'type'};
286           }
287          }
288   }
289  
290 < sub IncludePath_Start {
291 <        my $self=shift;
292 <        my $name=shift;
293 <        my $hashref=shift;
294 <
295 <        $self->{switch}->checktag( $name, $hashref, 'path');
296 <        if ( $self->{Arch} ) {
297 <          print GNUmakefile "INCLUDE+=".$self->_location()."/".
298 <                                                $$hashref{'path'}."\n";
299 <        }
300 < }
290 > sub IncludePath_Start
291 >   {
292 >   my $self=shift;
293 >   my $name=shift;
294 >   my $hashref=shift;
295 >  
296 >   $self->verbose(">> IncludePath_Start: NM ".$name." <<");
297 >  
298 >   $self->{switch}->checktag( $name, $hashref, 'path');
299 >   if ( $self->{Arch} )
300 >      {
301 >      print GNUmakefile "INCLUDE+=".$self->_location()."/".$$hashref{'path'}."\n";
302 >      }
303 >   }
304  
305   #
306 < # --- <Build class=> tag
306 > # generic build tag
307   #
342
343 #
344 # Parameter collection
345 #
346 sub BuildBlock_start {
347        my $self=shift;
348        my $name=shift;
349        my $hashref=shift;
350
351
352        my $blockobjid=$self->__blockobjid($hashref);
353
354        if ( $self->{Arch} ) {
355
356           # -- get any objects that match
357           my $inheritobj=$self->{block}->getobj($blockobjid);
358
359           # -- create an object with inherited properties
360           my $obj;
361           if ( ! defined $inheritobj ) {
362               # -- check we have a lookup for the class type
363               my $mapper=$self->_toolmapper();
364               if ( ! $mapper->exists($$hashref{'class'}) ) {
365                 $self->{switch}->parseerror("Unknown class : ".
366                                                        $$hashref{'class'});
367               }
368               $obj=BuildSystem::BuildClass->new();
369           }
370           else {
371               # -- inherit the properties from class with the same id class
372               $obj=$inheritobj->child();
373           }
374
375           # -- add changes from our tag
376           $obj->paramupdate($hashref);
377
378           # -- store the new object in the block
379           $self->{block}->setobj($obj,$blockobjid);
380        }
381 }
382
383 sub BuilderClass_buildmakefile {
384        my $self=shift;
385        my $name=shift;
386        my $hashref=shift;
387
388        my $blockobjid=$self->__blockobjid($hashref);
389
390        if ( $self->{Arch} ) {
391           # -- get the matching block object
392           my $blockobj=$self->{buildblock}->getobj($blockobjid);
393
394           # -- top level buildfile
395           my $fh=$self->{filehandlestack}[0];
396
397           # -- var initialisation
398           my @deftypes=();
399           my $buildname="";
400           my @types=$self->_toolmapper()->types($$hashref{'class'});
401
402           # -- error checking
403           if ( ! defined $blockobj->param("default") ) {
404             $self->error("No default build parameter defined for ".
405                $$hashref{'class'}." ".$$hashref{'id'});
406           }
407           if ( ! defined $blockobj->param("name") ) {
408             $self->error("\"name\" parameter defined for ".
409                $$hashref{'class'}." ".$$hashref{'id'});
410           }
411
412
413           foreach $param ( $blockobj->paramlist() ) {
414             # -- check for params that need special handling
415             if ( $param eq "default" ) {
416                @deftypes=split /,/, $param;
417             }
418             elsif ( $param eq "name" ) {
419                $buildname=$blockobj->param($param);
420             }
421             else {
422                # -- simple transfer of block object parameters to makefile
423                print $fh $param.":=".$blockobj->param($param)."\n";
424             }
425           }
426
427           # -- construct the targets in the top makefile
428           $self->_generatedefaulttargets($fh,$$hashref{'class'},@deftypes);
429           $self->_generatetypetargets($fh,$$hashref{'class'},$buildname,@types);
430        }
431 }
432
433 sub _blockobjid {
434        my $self=shift;
435        my $hashref=shift;
436
437        $self->{switch}->checktag($name,$hashref,'class');
438        $self->{switch}->checktag($name,$hashref,'id');
439        my $blockobjid="bc_".$$hashref{'class'},"_".$$hashref{'id'};
440
441        return $blockobjid;
442 }
443
308   sub Build_start {
309          my $self=shift;
310          my $name=shift;
311          my $hashref=shift;
312  
313 +        $self->verbose(">> Build_start: NM ".$name." <<");
314 +        
315          $self->{switch}->checktag($name,$hashref,'class');
450        $self->{switch}->checktag($name,$hashref,'id');
316          if ( $self->{Arch} ) {
317  
318            # -- determine the build products name
# Line 457 | Line 322 | sub Build_start {
322            }
323            else {
324              $self->{switch}->parseerror("No name specified for build product");
460            #$name="\$(buildname)";
325            }
326  
327            # -- check we have a lookup for the class type
# Line 497 | Line 361 | sub Build_start {
361              my $dirname=$$hashref{'class'}."_".$type."_".$name;
362              my $here="$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/".$dirname;
363              my $makefile=$here."/BuildFile.mk";
500 #           AddDir::adddir($here);
364  
365              # -- create link targets to the directory
366              push @targets, $dirname;
# Line 529 | Line 392 | sub Build_start {
392              }
393              print $fh "\tfi\n";
394              print $fh "\n";
532 #           print $typefile "$name :\n";
533 #           print $typefile "\t\$(_quietbuild_)";
534 #           print $typefile $mapper->template($$hashref{'class'},$type)."\n";
535 #           print $typefile "\t\$(_quietstamp_)";
536 #           print $typefile "\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$@.ds \$@ \$^\n";
395  
396              # -- cleaning targets
397              push @targets, "clean_$dirname";
# Line 574 | Line 432 | sub Bin_start {
432          my $tool;
433          my $filename;
434          my $objectname;
435 +
436 +        $self->verbose(">>          <<");
437          
438          $self->{switch}->checktag($name,$hashref,'file');
439          if ( $self->{Arch} ) {
# Line 732 | Line 592 | ENDTEXT
592          close binGNUmakefile;
593   }
594  
595 + sub Module_start {
596 +        my $self=shift;
597 +        my $name=shift;
598 +        my $hashref=shift;
599 +
600 +        my $fileclass;
601 +        my @tools;
602 +        my $tool;
603 +        my $filename;
604 +        my $objectname;
605 +
606 +        $self->verbose(">> In module_start: ".$name." <<");
607 +        
608 +        $self->{switch}->checktag($name,$hashref,'file');
609 +        if ( $self->{Arch} ) {
610 +        if ( ! defined $$hashref{name} ) {
611 +                ($$hashref{name}=$$hashref{file})=~s/\..*//;
612 +        }
613 +        ($filename=$$hashref{file})=~s/\..*//;
614 +
615 +        # Create a new directory for each module target
616 +        my $dirname="module_".$$hashref{name};
617 +        AddDir::adddir("$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/$dirname");
618 +        open (moduleGNUmakefile,
619 +           ">$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/$dirname/BuildFile.mk") or die           "Unable to make $ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/$dirname/".
620 +           "BuildFile.mk $!\n";
621 +
622 +        # Create the link targets
623 +        $numbins++;
624 +        my $fh=$self->{filehandlestack}[0];
625 +        print $fh <<ENDTEXT;
626 +
627 + # Link Targets to module directories
628 + ifdef MODULEMODE
629 + # We dont want to build a library here
630 + override files:=
631 + endif
632 + ifndef MODULEMODE
633 +
634 + BINMODE=true
635 +  
636 + define stepdown_$$hashref{'name'}
637 + if [ -d "$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/$dirname" ]; then \\
638 + cd $ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/$dirname; \\
639 + \$(MAKE) MODULEMODE=true LatestBuildFile=$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/$dirname/BuildFile.mk workdir=\$(workdir)/$dirname -f \$(TOOL_HOME)/basics.mk datestamp \$\@; \\
640 + fi
641 + endef
642 +
643 + define stepdown2_$$hashref{'name'}
644 + if [ -d "$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/$dirname" ]; then \\
645 + cd $ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/$dirname; \\
646 + \$(MAKE) MODULEMODE=true LatestBuildFile=$ENV{LOCALTOP}/$ENV{INTwork}/$self{path}/$dirname/BuildFile.mk workdir=\$(workdir)/$dirname -f \$(TOOL_HOME)/basics.mk datestamp \$\*; \\
647 + fi
648 +
649 + endef
650 +
651 + module_$$hashref{'name'}_%:: dummy
652 +        \@\$(stepdown2_$$hashref{'name'})
653 +
654 + $$hashref{'name'}_%:: dummy
655 +        \@\$(stepdown_$$hashref{'name'})
656 +
657 + help module module_debug module_debug_local module_insure module_Insure clean $$hashref{'name'}:: dummy
658 +        \@\$(stepdown_$$hashref{'name'})
659 +
660 + modulefiles+=$$hashref{'file'}
661 + locmodulefiles+=$dirname/$$hashref{'file'}
662 + endif
663 +
664 +
665 + ENDTEXT
666 +
667 +
668 + # the module specifics makefile
669 +        print moduleGNUmakefile "include ".$self->{currentenv}."\n";
670 +        print moduleGNUmakefile "VPATH+=$ENV{LOCALTOP}/$self{path}\n";
671 +
672 + # alias for bin_Insure
673 +        print moduleGNUmakefile <<ENDTEXT;
674 +
675 + module_insure:module_Insure
676 + ifdef MAKETARGET_module_insure
677 + MAKETARGET_$$hashref{name}_Insure=1
678 + endif
679 +
680 + # debuggging target
681 + $$hashref{'name'}_echo_% :: echo_%
682 +
683 + # help targets
684 + help::
685 + \t\@echo  
686 + \t\@echo Targets For $$hashref{'name'}
687 + \t\@echo -------------------------------------
688 + \t\@echo $$hashref{'name'}  - default build
689 + \t\@echo module_$$hashref{'name'}_clean - executable specific cleaning
690 + ENDTEXT
691 +
692 + # Make generic rules for each type
693 +        $targettypes={
694 +                "module" => 'o',
695 +                "module_debug" => 'd',
696 +                "module_debug_local" => 'l_d',
697 +                "module_Insure" => 'Insure'
698 +        };
699 +        #
700 +        foreach $target ( keys %$targettypes ) {
701 +          print moduleGNUmakefile <<ENDTEXT;
702 +
703 + # Type $target specifics
704 + ifdef MAKETARGET_$target
705 + MAKETARGET_$$hashref{name}_$$targettypes{$target}=1
706 + endif
707 + $target ::$$hashref{name}_$$targettypes{$target}
708 +
709 + moduletargets+=$$hashref{name}_$$targettypes{$target}
710 + help::
711 + \t\@echo $$hashref{name}_$$targettypes{$target}
712 + clean::
713 + \t\@if [ -f \$(modulestore)/$$hashref{name}_$$targettypes{$target} ]; then \\
714 + \techo Removing \$(modulestore)/$$hashref{name}; \\
715 + \trm \$(modulestore)/$$hashref{name}_$$targettypes{$target}; \\
716 + \tfi
717 +
718 + ENDTEXT
719 +          ($objectname=$$hashref{file})=~s/\..*/_$$targettypes{$target}\.o/;
720 +          ${"objectname_$$targettypes{$target}"}=$objectname;
721 +          print moduleGNUmakefile "$objectname:$$hashref{name}.dep\n";
722 +        } # end loop
723 +        print moduleGNUmakefile "MDFLAGS= -shared -Wl,-soname,\$\@","\n";
724 +        print moduleGNUmakefile "$$hashref{name}_Insure.so:.psrc\n";
725 +        print moduleGNUmakefile "$$hashref{name}_d.so:$objectname_d\n";
726 +        print moduleGNUmakefile "\t\$(CClinkCmdDebug) \$(MDFLAGS)\n";
727 +        print moduleGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
728 +        print moduleGNUmakefile "$$hashref{name}_l_d.so:$objectname_d\n";
729 +        print moduleGNUmakefile "\t\$(CClinkCmdDebugLocal) \$(MDFLAGS)\n";
730 +        print moduleGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
731 +        print moduleGNUmakefile "$$hashref{name}_Insure.so:$objectname_Insure\n";
732 +        print moduleGNUmakefile "\t\$(CClinkCmdInsure) \$(MDFLAGS)\n";
733 +        print moduleGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
734 +        print moduleGNUmakefile "$$hashref{name}_o.so:$objectname_o\n";
735 +        print moduleGNUmakefile "\t\$(CClinkCmd) \$(MDFLAGS)\n";
736 +        print moduleGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n";
737 +        print moduleGNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
738 +        print moduleGNUmakefile "-include $$hashref{name}.dep\n";
739 + print moduleGNUmakefile <<ENDTEXT;
740 + clean::
741 + \t\@if [ -f \$(modulestore)/lib$$hashref{name} ]; then \\
742 + \techo Removing \$(modulestore)/lib$$hashref{name}; \\
743 + \trm \$(modulestore)/lib$$hashref{name}; \\
744 + \tfi
745 +
746 +  
747 + $$hashref{name}_d.so:\$(libslocal_d)
748 + $$hashref{name}_o.so:\$(libslocal)
749 + ifdef MCCABE_DATA_DIR
750 + $$hashref{name}_mccabe.so: \$(libslocal_d) \$(MCCABE_DATA_DIR)/mccabeinstr/instplus.cpp
751 + endif
752 + $$hashref{name}_Insure.so:\$(libslocal_I)
753 + $$hashref{name}_d:$$hashref{name}_d.so
754 +        \@cp $$hashref{name}_d.so \$(modulestore)/lib$$hashref{name}
755 + $$hashref{name}_l_d:$$hashref{name}_l_d.so
756 +        \@cp $$hashref{name}_l_d.so \$(modulestore)/lib$$hashref{name}
757 + $$hashref{name}_Insure:$$hashref{name}_Insure.so
758 +        \@cp $$hashref{name}_Insure.so \$(modulestore)/lib$$hashref{name}_Insure
759 + $$hashref{name}:$$hashref{name}_d.so
760 +        \@mv $$hashref{name}_d.so \$(modulestore)/lib$$hashref{name}
761 + $$hashref{name}_o:$$hashref{name}_o.so
762 +        \@mv $$hashref{name}_o.so \$(modulestore)/lib$$hashref{name}.so
763 + modulefiles+=$$hashref{file}
764 + ENDTEXT
765 +        }
766 +        close moduleGNUmakefile;
767 + }
768 +
769 +
770   sub External_StartTag {
771          my $self=shift;
772          my $name=shift;
773          my $hashref=shift;
774 +
775 +        $self->verbose(">> External_StartTag: NM ".$name." <<");
776          
777          my $tool;
778          if ( $self->{Arch} ) {
# Line 789 | Line 826 | sub Group_start {
826          my $name=shift;
827          my $hashref=shift;
828          
829 +        $self->verbose(">> Group_start: NM ".$name." <<");
830 +        
831          $self->{switch}->checktag($name, $hashref, 'name');
832          if ( $self->{Arch} ) {
833          print GNUmakefile "GROUP_".$$hashref{'name'};
# Line 799 | Line 838 | sub Group_start {
838          }
839   }      
840  
841 < sub Use_start {
842 <        my $self=shift;
843 <        my $name=shift;
844 <        my $hashref=shift;
845 <        my $filename;
846 <        use Utilities::SCRAMUtils;
847 <        
848 <        $self->{switch}->checktag($name, $hashref, "name");
849 <        if ( $self->{Arch} ) {
850 <        if ( exists $$hashref{'group'} ) {
851 <          print GNUmakefile "GROUP_".$$hashref{'group'}."=true\n";
852 <        }
853 <        if ( ! defined $self->{remoteproject} ) {
854 <          $filename=SCRAMUtils::checkfile(
855 <                "/$ENV{INTsrc}/$$hashref{name}/BuildFile");
856 <          # -- force a dependency check if local
857 <          if ( $filename=~/^$self->{localtop}/ ) {
858 <            $self->{Builder}->BuildDir($ENV{INTsrc}."/".$$hashref{'name'});
859 <          }
860 <        }
861 <        else {
862 <          $filename=$self->{remoteproject}."/$$hashref{name}/BuildFile";
863 <        print "trying $filename\n";
864 <          if ( ! -f $filename ) { $filename=""; };
865 <        }
866 <        if ( $filename ne "" ) {
867 <          $self->ParseBuildFile_Export( $filename );
868 <        }
869 <        else {
870 <           $self->{switch}->parseerror("Unable to detect Appropriate ".
871 <                "decription file for <$name name=".$$hashref{name}.">");
872 <        }
873 <        }
841 > sub Use_start
842 >   {
843 >   my $self=shift;
844 >   my $name=shift;
845 >   my $hashref=shift;
846 >   my $filename;
847 >   use Utilities::SCRAMUtils;
848 >
849 >   $self->verbose(">> Use_start: NM ".$name." <<");
850 >  
851 >   $self->{switch}->checktag($name, $hashref, "name");
852 >   if ( $self->{Arch} )
853 >      {
854 >      if ( exists $$hashref{'group'} )
855 >         {
856 >         print GNUmakefile "GROUP_".$$hashref{'group'}."=true\n";
857 >         }
858 >      if ( ! defined $self->{remoteproject} )
859 >         {
860 >         $filename=SCRAMUtils::checkfile("/$ENV{INTsrc}/$$hashref{name}/BuildFile");
861 >         }
862 >      else
863 >         {
864 >         $filename=$self->{remoteproject}."/$$hashref{name}/BuildFile";
865 >         # Not sure how useful this statement is, so I'll remove it for now:
866 >         # print STDERR "Trying $filename\n";
867 >         if ( ! -f $filename ) { $filename=""; };
868 >         }
869 >      if ( $filename ne "" )
870 >         {
871 >         $self->ParseBuildFile_Export( $filename );
872 >         }
873 >      else
874 >         {
875 >         $self->{switch}->parseerror("Unable to detect Appropriate ".
876 >                                     "decription file for <$name name=".$$hashref{name}.">");
877 >         }
878 >      }
879 >   }
880 >
881 > sub CheckBuildFile {
882 >         my $self=shift;
883 >         my $classdir=shift;
884 >         my $ClassName="";
885 >         my $thisfile="$classdir/$buildfile";
886 >        
887 >         if ( -e $ENV{LOCALTOP}."/".$thisfile ) {
888 >            $DefaultBuildfile="$ENV{LOCALTOP}/$thisfile";
889 >            $self->ParseBuildFile($ENV{LOCALTOP}, $classdir, $buildfile);
890 >         }
891 >         elsif ( -e $ENV{RELEASETOP}."/".$thisfile ) {
892 >            $DefaultBuildfile="$ENV{RELEASETOP}/$thisfile";
893 >            $self->ParseBuildFile($ENV{RELEASETOP}, $classdir, $buildfile);
894 >         }
895 >         $self->verbose(">> CheckBuildFile: FN ".$thisfile." CN ".$ClassName." <<");
896 >         return $ClassName;
897   }
898  
899   # List association groups between <AssociateGroup> tags
# Line 842 | Line 904 | sub AssociateGroup {
904          my $string=shift;
905          my $word;
906  
907 +        $self->verbose(">> AssociateGroup: NM ".$name." ST ".$string." <<");
908 +        
909          if ( $self->{Arch} ) {
910          foreach $word ( (split /\s/, $string) ){
911                  chomp $word;
# Line 858 | Line 922 | sub Arch_Start {
922          my $name=shift;
923          my $hashref=shift;
924  
925 +        $self->verbose(">> Arch_Start: NM ".$name." <<");
926 +        
927          $self->{switch}->checktag($name, $hashref,'name');
928          ( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($self->{Arch}=1)
929                                                  : ($self->{Arch}=0);
# Line 867 | Line 933 | sub Arch_Start {
933   sub Arch_End {
934          my $self=shift;
935          my $name=shift;
936 +        
937 +        $self->verbose(">> Arch_End: NM ".$name." <<");
938  
939 <        pop @{$self->{ARCHBLOCK}};
939 >        pop @{$self->{ARCHBLOCK}};
940          $self->{Arch}=$self->{ARCHBLOCK}[$#{$self->{ARCHBLOCK}}];
941   }
942  
# Line 876 | Line 944 | sub Arch_End {
944   sub _CutBlock {
945      my $self=shift;
946      my $string= shift @_;
947 +
948 +    $self->verbose(">> _CutBlock: ST ".$string." <<");
949 +    
950      @BlockClassA = split /\//, $string;
951   }
952  
# Line 883 | Line 954 | sub OutToMakefile {
954          my $self=shift;
955          my $name=shift;
956          my @vars=@_;
957 +        
958 +        $self->verbose(">> OutToMakefile: <<");
959  
960          if ( $self->{Arch} ) {
961 +          $self->verbose(">> CONT: ".$#vars." lines <<");
962            print GNUmakefile @vars;
963          }
964   }
# Line 892 | Line 966 | sub OutToMakefile {
966   sub OutToScreen {
967          my $name=shift;
968          my @vars=@_;
969 <
969 >        
970          if ( $self->{Arch} ) {
971            print @vars;
972          }
# Line 902 | Line 976 | sub setBlockClassPath {
976          my $name=shift;
977          my $hashref=shift;
978  
979 +        $self->verbose(">> setBlockClassPath: NM ".$name." <<");
980 +        
981          $self->{switch}->checktag($name, $hashref, 'path');
982          $self->{BlockClassPath}=$self->{BlockClassPath}.":".$$hashref{path};
983          $self->_CutBlock($$hashref{path});
# Line 909 | Line 985 | sub setBlockClassPath {
985  
986   sub BlockClassPath {
987          my $self=shift;
988 +
989 +        $self->verbose(">> BlockClassPath: <<");
990 +
991          return $self->{BlockClassPath};
992   }
993  
# Line 917 | Line 996 | sub export_start_export {
996          my $name=shift;
997          my $hashref=shift;
998  
999 +        $self->verbose(">> export_start_export: NM ".$name." <<");
1000 +        
1001          $self->{switch}->opengroup("__export");
1002   }
1003  
# Line 925 | Line 1006 | sub export_start {
1006          my $name=shift;
1007          my $hashref=shift;
1008  
1009 +        $self->verbose(">> export_start: NM ".$name." <<");
1010 +        
1011          $self->{switch}->opengroup("__export");
1012          if ( exists $$hashref{autoexport} ) {
1013            print GNUmakefile "scram_autoexport=".$$hashref{autoexport}."\n";
# Line 941 | Line 1024 | sub export_start {
1024  
1025   sub export_end_export {
1026          my $self=shift;
1027 +        $self->verbose(">> export_end_export: <<");
1028          $self->{switch}->closegroup("__export");
1029   }
1030  
1031   sub export_end {
1032          my $self=shift;
1033 +        $self->verbose(">> export_end: <<");
1034          $self->{switch}->closegroup("__export");
1035          print GNUmakefile "endif\n";
1036   }
# Line 953 | Line 1038 | sub export_end {
1038   #
1039   # Standard lib tag
1040   #
1041 < sub lib_start {
1042 <        my $self=shift;
1043 <        my $name=shift;
1044 <        my $hashref=shift;
1041 > sub lib_start
1042 >   {
1043 >   my $self=shift;
1044 >   my $name=shift;
1045 >   my $hashref=shift;
1046 >  
1047 >   $self->verbose(">> lib_start: NM ".$name." <<");
1048 >  
1049 >   $self->{switch}->checktag($name, $hashref, 'name');
1050 >
1051 >   if ( $self->{Arch} )
1052 >      {
1053 >      print GNUmakefile "lib+=$$hashref{name}\n";
1054 >      }
1055 >   }
1056  
1057 <        $self->{switch}->checktag($name, $hashref, 'name');
1058 <        if ( $self->{Arch} ) {
1059 <           print GNUmakefile "lib+=$$hashref{name}\n";
1060 <        }
1061 < }
1057 > # Standard debug lib tag
1058 > #
1059 > sub debuglib_start
1060 >   {
1061 >   my $self=shift;
1062 >   my $name=shift;
1063 >   my $hashref=shift;
1064 >  
1065 >   $self->verbose(">> debuglib_start: NM ".$name." <<");
1066 >   $self->{switch}->checktag($name, $hashref, 'name');
1067 >
1068 >   if ( $self->{Arch} )
1069 >      {
1070 >      print GNUmakefile "debuglib+=$$hashref{name}\n";
1071 >      }
1072 >   }
1073  
1074   #
1075   # libtype specification
# Line 971 | Line 1078 | sub LibType_Start {
1078          my $self=shift;
1079          my $name=shift;
1080          my $hashref=shift;
1081 <
1081 >        
1082 >        $self->verbose(">> LibType_Start: NM ".$name." <<");
1083 >        
1084          if ( $self->{Arch} ) {
1085          if ( defined $self->{libtype_conext} ) {
1086            $self->{switch}->parseerror("<$name> tag cannot be specified".
# Line 1004 | Line 1113 | sub LibType_text {
1113          my $self=shift;
1114          my $name=shift;
1115          my $string=shift;
1116 +        $self->verbose(">> LibType_text: NM ".$name." <<");
1117  
1118 <        if ( $self->{Arch} ) {
1118 >        if ( $self->{Arch} ) {
1119            $string=~s/\n/ /g;
1120            print GNUmakefile "libmsg::\n\t\@echo Library info: ";
1121            print GNUmakefile $string;
# Line 1017 | Line 1127 | sub LibType_end {
1127          my $self=shift;
1128          my $name=shift;
1129  
1130 +        $self->verbose(">> LibType_end: NM ".$name." <<");
1131 +
1132          undef $self->{libtype_conext};
1133   }
1134  
# Line 1025 | Line 1137 | sub Environment_start {
1137          my $name=shift;
1138          my $hashref=shift;
1139  
1140 +        $self->verbose(">> Environment_start: NM ".$name." <<");
1141 +        
1142          if ( $self->{Arch} ) {
1143            $self->{envnum}++;
1144  
1145            # open a new Environment File
1146 <          my $envfile=$self->{localtop}."/$ENV{INTwork}/$self->{path}/Env_".
1146 >          my $envfile="$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/Env_".
1147                  $self->{envnum}.".mk";
1148            use FileHandle;
1149            my $fh=FileHandle->new();
# Line 1039 | Line 1153 | sub Environment_start {
1153  
1154            # include the approprate environment file
1155            if ( $self->{envlevel} == 0 ) {
1156 <             print GNUmakefile "include $self->{localtop}/$ENV{INTwork}/".
1156 >             print GNUmakefile "include $ENV{LOCALTOP}/$ENV{INTwork}/".
1157                  $self->{path}."/BuildFile.mk\n";
1158            }
1159            else {
1160 <             print GNUmakefile "include $self->{localtop}/$ENV{INTwork}/".
1160 >             print GNUmakefile "include $ENV{LOCALTOP}/$ENV{INTwork}/".
1161                  $self->{path}."/Env_".$self->{Envlevels}[$self->{envlevel}].".mk\n";
1162            }
1163            $self->{envlevel}++;
1164            $self->{Envlevels}[$self->{envlevel}]=$self->{envnum};
1165 <          $self->{currentenv}="$self->{localtop}/$ENV{INTwork}/$self->{path}/Env_$self->{envnum}.mk";
1165 >          $self->{currentenv}="$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/Env_$self->{envnum}.mk";
1166          }
1167   }
1168  
# Line 1056 | Line 1170 | sub Environment_end {
1170          my $self=shift;
1171          my $fd;
1172  
1173 +        $self->verbose(">> Environment_end: NM ".$name." <<");
1174 +
1175          if ( $self->{Arch} ) {
1176            $self->{envlevel}--;
1177            if ( $self->{envlevel} < 0 ) {
# Line 1068 | Line 1184 | sub Environment_end {
1184            close $fd;
1185            *GNUmakefile=$self->{filehandlestack}[$#{$self->{filehandlestack}}];
1186            if ( $self->{envlevel} < 1 ) {
1187 <            $self->{currentenv}="$self->{localtop}/$ENV{INTwork}/$self->{path}/".
1187 >            $self->{currentenv}="$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/".
1188                          "BuildFile.mk";
1189            }
1190            else {
1191              $self->{currentenv}=
1192 <             $self->{localtop}."/$ENV{INTwork}/$self->{path}/Env_".
1192 >             "$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}/Env_".
1193                  $self->{Envlevels}[$self->{envlevel}];
1194            }
1195          }
# Line 1084 | Line 1200 | sub Store_start {
1200          my $name=shift;
1201          my $hashref=shift;
1202  
1203 +        $self->verbose(">> Store_start: NM ".$name." <<");
1204 +
1205          if ( $self->{Arch} ) {
1206            $self->{switch}->checktag( $name, $hashref, 'name' );
1207  
1208            # -- store creation
1209            my $dir=$$hashref{'name'};
1210 <          AddDir::adddir($self->{localtop}."/".$dir);
1210 >          AddDir::adddir($ENV{LOCALTOP}."/".$dir);
1211            if ( exists $$hashref{'type'} ) {
1212              # -- architecture specific store
1213              if ( $$hashref{'type'}=~/^arch/i ) {
1214                  $dir=$dir."/".$ENV{SCRAM_ARCH};
1215 <                AddDir::adddir($self->{localtop}."/".$dir);
1215 >                AddDir::adddir($ENV{LOCALTOP}."/".$dir);
1216              }
1217              else {
1218                  $self->parseerror("Unknown type in <$name> tag");
# Line 1104 | Line 1222 | sub Store_start {
1222            # -- set make variables for the store
1223            print GNUmakefile "SCRAMSTORENAME_".$$hashref{'name'}.":=".$dir."\n";
1224            print GNUmakefile "SCRAMSTORE_".$$hashref{'name'}.":=".
1225 <                                        $self->{localtop}."/".$dir."\n";
1226 <          print GNUmakefile "VPATH+=".$self->{localtop}
1227 <                        ."/".$dir.":".$self->{releasetop}."/".$dir."\n";
1225 >                                        $ENV{LOCALTOP}."/".$dir."\n";
1226 >          print GNUmakefile "VPATH+=".$ENV{LOCALTOP}
1227 >                        ."/".$dir.":".$ENV{RELEASETOP}."/".$dir."\n";
1228          }
1229   }
1230  
1231 + sub CompilerMap_Start
1232 +   {
1233 +   ###############################################################
1234 +   # CompilerMap_Start                                           #
1235 +   ###############################################################
1236 +   # modified : Fri Oct  4 15:08:39 2002 / SFA                   #
1237 +   # params   :                                                  #
1238 +   #          :                                                  #
1239 +   #          :                                                  #
1240 +   #          :                                                  #
1241 +   # function : Create a map between a SUBARCH and specific      #
1242 +   #          : compiler and version.                            #
1243 +   #          :                                                  #
1244 +   #          :                                                  #
1245 +   ###############################################################
1246 +   my $self=shift;
1247 +   my $name=shift;
1248 +   my $hashref=shift;
1249 +
1250 +   $self->verbose(">> CompilerMap_Start: NM ".$name." <<");
1251 +
1252 +   # We can only map compilers to already-defined architectures, so
1253 +   # we check for 'Arch':
1254 +   if ( $self->{Arch} )
1255 +      {
1256 +      my @tagnames=keys %{$hashref};
1257 +      my @tagvalues=values %{$hashref};
1258 +      
1259 +      foreach my $tag ( @tagnames )
1260 +         {
1261 +         $self->{switch}->checktag($name,$hashref,$tag);
1262 +         print GNUmakefile $tag."=".$$hashref{$tag}."\n";
1263 + #       if ( defined $$hashref{'version'} ) {
1264 + #               print GNUmakefile "_V_".$$hashref{'version'};
1265 + #       }
1266 + #       print GNUmakefile "=true\n";
1267 +
1268 +         }
1269 + #        $self->{switch}->checktag($name,$hashref,'ref');
1270 +
1271 + #       # -- oo toolbox stuff
1272 + #       # - get the appropriate tool object
1273 + #       $$hashref{'ref'}=~tr[A-Z][a-z];
1274 + #       if ( ! exists $$hashref{'version'} ) {
1275 + #        $tool=$self->{toolbox}->gettool($$hashref{'ref'});
1276 + #       }
1277 + #       else {
1278 + #        $tool=$self->{toolbox}->gettool($$hashref{'ref'},$$hashref{'version'});
1279 + #       }
1280 + #       if ( ! defined $tool ) {
1281 + #         $self->{switch}->parseerror("Unknown Tool Specified ("
1282 + #                                                       .$$hashref{'ref'}.")");
1283 + #       }
1284 +
1285 + #       # -- old fashioned GNUmakefile stuff
1286 + #       print GNUmakefile $$hashref{'ref'};
1287 + #       if ( defined $$hashref{'version'} ) {
1288 + #               print GNUmakefile "_V_".$$hashref{'version'};
1289 + #       }
1290 + #       print GNUmakefile "=true\n";
1291 +        
1292 + #       # -- Sub system also specified?
1293 + #       if ( exists $$hashref{'use'} ) {
1294 + #          # -- look for a buildfile
1295 + #          my @paths=$tool->getfeature("INCLUDE");
1296 + #          my $file="";
1297 + #          my ($path,$testfile);
1298 + #          foreach $path ( @paths ) {
1299 + #            $testfile=$path."/".$$hashref{'use'}."/BuildFile" ;
1300 + #            if ( -f $testfile ) {
1301 + #               $file=$testfile;
1302 + #               $self->_pushremoteproject($path);
1303 + #            }
1304 + #          }
1305 + #          if ( $file eq "" ) {
1306 + #            $self->{switch}->parseerror("Unable to find SubSystem $testfile");
1307 + #          }
1308 + #          $self->ParseBuildFile_Export($file);
1309 + #          $self->_popremoteproject();
1310 + #        }
1311 +      }
1312 +   else
1313 +      {
1314 +      print "No architecture defined: not possible to define a compiler-to-subarch mapping.","\n";
1315 +      }
1316 +   }
1317 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines