35 |
|
|
36 |
|
# -- specifiy these files for dependency information |
37 |
|
my $depfile=$ENV{projconfigdir}."/External_Dependencies"; |
38 |
< |
my $clientfile="$ENV{LOCALTOP}/.SCRAM/$ENV{SCRAM_ARCH}/clientsettings"; |
39 |
< |
my $clientreq="$ENV{LOCALTOP}/.SCRAM/$ENV{SCRAM_ARCH}/". |
40 |
< |
"clientsettings_reqs"; |
38 |
> |
|
39 |
> |
# -- get list of dependent files |
40 |
> |
my $datadir=$ENV{LOCALTOP}."/.SCRAM/".$ENV{SCRAM_ARCH}; |
41 |
> |
$fdir=FileHandle->new(); |
42 |
> |
opendir $fdir, $datadir or die |
43 |
> |
"unable to access $datadir $!\n"; |
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(); |
55 |
|
$fout->open(">".$outfile) or die "Unable to open $outfile for output". |
56 |
|
$!."\n"; |
57 |
|
|
49 |
– |
# -- cludge in the dependencies - need to go via toolbox really |
50 |
– |
my $fh=FileHandle->new(); |
51 |
– |
open ($fh, "<$clientreq" ); |
52 |
– |
while( <$fh> ) { |
53 |
– |
print $fout $_; |
54 |
– |
} |
55 |
– |
undef $fh; |
56 |
– |
|
58 |
|
# -- print out tool/ version info |
59 |
|
my ($tool,$toolobj,$f,$val,$version); |
60 |
|
foreach $toolpair ( $self->{toolbox}->tools() ) { |
61 |
|
$tool=$$toolpair[0]; |
62 |
|
$version=$$toolpair[1]; |
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 ) { |
69 |
+ |
print $fout "ifdef ".$tool."_V_".$version."\n $d=true\nendif\n"; |
70 |
+ |
} |
71 |
+ |
# -- tool info |
72 |
|
print $fout "ifdef ".$tool."_V_".$version."\n"; |
73 |
|
foreach $f ( $toolobj->features() ) { |
74 |
|
foreach $val ( $toolobj->getfeature($f) ) { |
123 |
|
elsif ( -e $ENV{RELEASETOP}."/".$projectfile ) { |
124 |
|
$ENV{projectfile}=$ENV{RELEASETOP}."/".$projectfile; |
125 |
|
} |
118 |
– |
else { |
119 |
– |
print "Warning : Unable to find $projectfile\n"; |
120 |
– |
} |
126 |
|
if ( $DefaultBuildFile eq "" ) { |
127 |
|
# Map Relevant makefile classmakefile directory |
128 |
|
my $classmakefile=$ENV{projconfigdir}."/".$Class."_makefile.mk"; |