112 |
|
print $fout 'LDFLAGS+=$(addprefix -L,$(LIBDIR))'."\n"; |
113 |
|
print $fout 'CPPFLAGS+=$(addprefix -D,$(CPPDEFINES))'."\n"; |
114 |
|
print $fout 'lib+=$(extralib)'."\n"; |
115 |
< |
print $fout 'LDLIBS+=$(addprefix -l,$(lib))'."\n"; |
115 |
> |
# Hack to parse the lib list and remove duplicates: |
116 |
> |
print $fout 'ORDEREDLIB=$(shell $(SCRAMPERL) $(TOOL_HOME)/ProcessLibs $(lib))',"\n"; |
117 |
> |
print $fout 'LDLIBS+=$(addprefix -l,$(ORDEREDLIB))'."\n"; |
118 |
> |
#print $fout 'LDLIBS+=$(addprefix -l,$(lib))'."\n"; |
119 |
|
print $fout 'LDLIBS+=$(addprefix -l,$(REQUIRES))'."\n"; |
120 |
|
print $fout 'LD_LIBRARY_PATH:=$(subst $(space),:,$(LD_LIBRARY_PATH))'."\n"; |
121 |
< |
|
121 |
> |
|
122 |
|
undef $fout; |
123 |
|
} |
124 |
|
} |
251 |
|
# Do a datestamp check so that make will build files that have changed |
252 |
|
# rather than just those which are older than their dependencies |
253 |
|
# The main build here |
251 |
– |
$rv=system("gmake","--no-print-directory","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp_config); |
254 |
|
|
255 |
< |
print "\n","scram BUILDSYSTEM: V1.0 ****","\n"; |
255 |
> |
$rv=system("gmake","--no-print-directory","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp_config); |
256 |
|
|
257 |
< |
my $gmakejobsflag = "-j"; |
258 |
< |
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 |
< |
} |
257 |
> |
# Be verbose: |
258 |
> |
$self->verbose(">> Going to use ".$ENV{DefaultMakefile}." as the default makefile"); |
259 |
|
|
260 |
< |
# Modify: try to force make to spawn more than one job (option: -j ). |
260 |
> |
my $gmakejobsflag = "-j"; |
261 |
> |
# Temporarily hard-code ncpu as 1: |
262 |
> |
my $ncpu = 1; |
263 |
> |
|
264 |
|
$rv=system("gmake","--no-print-directory","$gmakejobsflag","$ncpu","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp, @Targets); |
265 |
+ |
|
266 |
|
return $rv/256; # return the exit status of gmake |
267 |
|
} |
268 |
|
|
272 |
|
my $Class="DEFAULT"; |
273 |
|
my $ClassDir=""; |
274 |
|
|
285 |
– |
#return if $dirname eq ""; |
275 |
|
@DIRA=split /\//, $dirname; |
276 |
|
|
277 |
|
$thispath="."; |