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

Comparing COMP/SCRAM/src/BuildSystem/BuildSetup.pm (file contents):
Revision 1.1.2.5 by williamc, Thu May 4 07:53:04 2000 UTC vs.
Revision 1.1.2.7.2.2.2.1.2.1 by williamc, Thu Oct 26 09:57:51 2000 UTC

# Line 27 | Line 27 | sub new {
27  
28   sub init {
29          my $self=shift;
30 <        $self->{toolbox}=BuildSystem::ToolBox->new($ENV{LOCALTOP});
30 >        $self->{toolbox}=BuildSystem::ToolBox->new($ENV{LOCALTOP},
31 >                                                        $ENV{SCRAM_ARCH});
32   }
33  
34   sub _generateexternals {
# Line 40 | Line 41 | sub _generateexternals {
41          # -- get list of dependent files
42          my $datadir=$ENV{LOCALTOP}."/.SCRAM/".$ENV{SCRAM_ARCH};
43          $fdir=FileHandle->new();
44 <        opendir $fdir, $datadir or die
44 <                        "unable to access $datadir $!\n";
44 >        opendir $fdir, $datadir;
45          my @depfiles=grep !/^\.\.?$/, readdir $fdir;
46          undef $fdir;
47          for (my $i=0; $i<=$#depfiles; $i++ ) {
# Line 58 | Line 58 | sub _generateexternals {
58  
59            # -- print out tool/ version info
60            my ($tool,$toolobj,$f,$val,$version);
61 <          foreach $toolpair ( $self->{toolbox}->tools() ) {
62 <            $tool=$$toolpair[0];
63 <            $version=$$toolpair[1];
61 >          foreach $tool ( $self->{toolbox}->tools() ) {
62 >            $version=$self->{toolbox}->defaultversion($tool);
63              # default versions
64              print $fout "ifdef $tool\n".$tool."_V_".$version."=true\nendif\n";
65 <            $toolobj=$self->{toolbox}->gettool($tool,$version);
66 <            # -- externals
67 <            @deps=$toolobj->getfeature("_externals");
68 <            foreach $d ( @deps ) {
65 >            # -- set up the different version  -- externals
66 >            foreach $version ( $self->{toolbox}->versions($tool) ) {
67 >             $toolobj=$self->{toolbox}->gettool($tool,$version);
68 >             @deps=$toolobj->getfeature("_externals");
69 >             foreach $d ( @deps ) {
70 >              $d=~tr[A-Z][a-z];
71                print $fout "ifdef ".$tool."_V_".$version."\n $d=true\nendif\n";
72 <            }
73 <            # -- tool info
74 <            print $fout "ifdef ".$tool."_V_".$version."\n";
75 <            foreach $f ( $toolobj->features() ) {
72 >             }
73 >             # -- tool info
74 >             print $fout "ifdef ".$tool."_V_".$version."\n";
75 >             foreach $f ( $toolobj->features() ) {
76                foreach $val ( $toolobj->getfeature($f) ) {
77                  print $fout "\t".$f." += ".$val."\n";
78                }
79 +             }
80 +             print $fout "endif\n";
81              }
79            print $fout "endif\n";
82            }
83            # some addittional processing of specific vars
84            print $fout 'INCLUDEPATH+=$(addprefix -I,$(INCLUDE))'."\n";
# Line 165 | Line 167 | sub BuildSetup {
167        if ( $word=~/.*=.*/ ) { # if we have an assignment it cant be a target
168           $targetnumber--;
169        }
170 +      elsif ( $word=~/^-/ ) {
171 +         $targetnumber--;
172 +      }
173        else {
174          $ENV{"MAKETARGET_".$word}=$word;
175        }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines