248 |
|
# Do a datestamp check so that make will build files that have changed |
249 |
|
# rather than just those which are older than their dependencies |
250 |
|
# The main build here |
251 |
– |
$rv=system("gmake","--no-print-directory","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp_config); |
251 |
|
|
252 |
< |
print "\n","scram BUILDSYSTEM: V1.0 ****","\n"; |
252 |
> |
$rv=system("gmake","--no-print-directory","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp_config); |
253 |
|
|
254 |
< |
my $gmakejobsflag = "-j"; |
255 |
< |
chomp(my $currentOS = `uname`); |
257 |
< |
|
258 |
< |
# Only use -j option if there are more then 1 cpu's..... |
259 |
< |
if ( $currentOS eq "Linux" ) |
260 |
< |
{ |
261 |
< |
chomp($ncpu=`cat /proc/cpuinfo | grep -c processor`); |
262 |
< |
} |
263 |
< |
elsif ( $currentOS eq "SunOS" ) |
264 |
< |
# How can you tell how many CPUs you've got in a Sun box?: |
265 |
< |
{ |
266 |
< |
$ncpu = 1; |
267 |
< |
} |
268 |
< |
else |
269 |
< |
# Who knows what the OS is. Leave as default: |
270 |
< |
{ |
271 |
< |
$npcu = 1; |
272 |
< |
} |
254 |
> |
# Be verbose: |
255 |
> |
$self->verbose(">> Going to use ".$ENV{DefaultMakefile}." as the default makefile"); |
256 |
|
|
257 |
< |
# Modify: try to force make to spawn more than one job (option: -j ). |
257 |
> |
my $gmakejobsflag = "-j"; |
258 |
> |
# Temporarily hard-code ncpu as 1: |
259 |
> |
my $ncpu = 1; |
260 |
> |
|
261 |
|
$rv=system("gmake","--no-print-directory","$gmakejobsflag","$ncpu","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp, @Targets); |
262 |
+ |
|
263 |
|
return $rv/256; # return the exit status of gmake |
264 |
|
} |
265 |
|
|
269 |
|
my $Class="DEFAULT"; |
270 |
|
my $ClassDir=""; |
271 |
|
|
285 |
– |
#return if $dirname eq ""; |
272 |
|
@DIRA=split /\//, $dirname; |
273 |
|
|
274 |
|
$thispath="."; |