250 |
|
# The main build here |
251 |
|
$rv=system("gmake","--no-print-directory","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp_config); |
252 |
|
|
253 |
– |
print "\n","scram BUILDSYSTEM: V1.0 ****","\n"; |
254 |
– |
|
253 |
|
my $gmakejobsflag = "-j"; |
254 |
< |
chomp(my $currentOS = `uname`); |
255 |
< |
|
256 |
< |
# 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 |
< |
} |
273 |
< |
|
274 |
< |
# Modify: try to force make to spawn more than one job (option: -j ). |
254 |
> |
# Temporarily hard-code ncpu as 1: |
255 |
> |
my $ncpu = 1; |
256 |
> |
|
257 |
|
$rv=system("gmake","--no-print-directory","$gmakejobsflag","$ncpu","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp, @Targets); |
258 |
+ |
|
259 |
|
return $rv/256; # return the exit status of gmake |
260 |
|
} |
261 |
|
|
265 |
|
my $Class="DEFAULT"; |
266 |
|
my $ClassDir=""; |
267 |
|
|
285 |
– |
#return if $dirname eq ""; |
268 |
|
@DIRA=split /\//, $dirname; |
269 |
|
|
270 |
|
$thispath="."; |