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.2 by williamc, Wed Apr 19 14:14:32 2000 UTC vs.
Revision 1.1.2.7 by williamc, Tue May 30 11:52:05 2000 UTC

# Line 2 | Line 2
2   #
3   # Interface
4   # ---------
5 < # new() : A new BuildSetup
5 > # new(toolbox) : A new BuildSetup
6   # BuildSetup(directory,targets) : prepare the ground for a build and build
7   # getclass(directory) : return (Class, ClassDir, BuildFileobject)
8   #                       associated with directory
# Line 20 | Line 20 | sub new {
20          my $class=shift;
21          my $self={};
22          bless $self,$class;
23 <        $self->init();
23 >        $self->{toolbox}=shift;
24 >        #$self->init();
25          return $self;
26   }
27  
28   sub init {
29          my $self=shift;
30 <        $self->{toolbox}=BuildSystem::ToolBox->new();
30 >        $self->{toolbox}=BuildSystem::ToolBox->new($ENV{LOCALTOP});
31   }
32  
33   sub _generateexternals {
# Line 35 | Line 36 | sub _generateexternals {
36  
37          # -- specifiy these files for dependency information
38          my $depfile=$ENV{projconfigdir}."/External_Dependencies";
39 <        my $clientfile="$ENV{LOCALTOP}/.SCRAM/$ENV{SCRAM_ARCH}/clientsettings";
40 <        my $clientreq="$ENV{LOCALTOP}/.SCRAM/$ENV{SCRAM_ARCH}/".
41 <                        "clientsettings_reqs";
39 >
40 >        # -- get list of dependent files
41 >        my $datadir=$ENV{LOCALTOP}."/.SCRAM/".$ENV{SCRAM_ARCH};
42 >        $fdir=FileHandle->new();
43 >        opendir $fdir, $datadir;
44 >        my @depfiles=grep !/^\.\.?$/, readdir $fdir;
45 >        undef $fdir;
46 >        for (my $i=0; $i<=$#depfiles; $i++ ) {
47 >           $depfiles[$i]=$datadir."/".$depfiles[$i];
48 >        }
49 >
50          # -- do we need to rebuild?
51 <        if ( SCRAMUtils::dated($outfile,$depfile, $clientfile,$clientreq) ) {
51 >        if ( SCRAMUtils::dated($outfile,@depfiles) ) {
52            print "Configuring Local Area\n";
53            # -- open output file
54            my $fout=FileHandle->new();
# Line 57 | Line 66 | sub _generateexternals {
66              # -- externals
67              @deps=$toolobj->getfeature("_externals");
68              foreach $d ( @deps ) {
69 +              $d=~tr[A-Z][a-z];
70                print $fout "ifdef ".$tool."_V_".$version."\n $d=true\nendif\n";
71              }
72              # -- tool info
# Line 114 | Line 124 | sub BuildSetup {
124      elsif ( -e $ENV{RELEASETOP}."/".$projectfile ) {
125        $ENV{projectfile}=$ENV{RELEASETOP}."/".$projectfile;
126      }
117    else {
118        print "Warning : Unable to find $projectfile\n";
119    }
127      if ( $DefaultBuildFile eq "" ) {
128        # Map Relevant makefile classmakefile directory
129        my $classmakefile=$ENV{projconfigdir}."/".$Class."_makefile.mk";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines