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.15 by sashby, Wed Aug 22 12:40:13 2001 UTC vs.
Revision 1.23 by sashby, Mon May 13 12:43:53 2002 UTC

# Line 112 | Line 112 | sub _generateexternals
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     }
# Line 248 | Line 251 | sub BuildSetup
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  
# Line 282 | Line 272 | sub getclass {
272      my $Class="DEFAULT";
273      my $ClassDir="";
274          
285    #return if $dirname eq "";
275      @DIRA=split /\//, $dirname;
276  
277      $thispath=".";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines