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.19 by sashby, Wed Nov 7 19:49:38 2001 UTC vs.
Revision 1.24 by sashby, Tue May 14 10:21:19 2002 UTC

# Line 40 | Line 40 | sub _generateexternals
40     {
41     my $self=shift;
42     my $outfile=shift;
43 <
43 >  
44     # -- specifiy these files for dependency information
45     # NB: This file is never used!
46    
# Line 66 | Line 66 | sub _generateexternals
66        my $fout=FileHandle->new();
67        $fout->open(">".$outfile) or die "Unable to open $outfile for output".
68           $!."\n";
69 <
69 >      
70        # -- print out tool/ version info
71        my ($tool,$toolobj,$f,$val,$version);
72 <          
72 >      
73        foreach $tool ( $self->{toolbox}->tools() )
74           {
75           $version=$self->{toolbox}->defaultversion($tool);
76          
77           # default versions
78           print $fout "ifdef $tool\n".$tool."_V_".$version."=true\nendif\n";
79 <
79 >        
80           # -- set up the different version  -- externals
81           foreach $version ( $self->{toolbox}->versions($tool) )
82              {
# Line 95 | Line 95 | sub _generateexternals
95                 {
96                 foreach $val ( $toolobj->getfeature($f) )
97                    {
98 <                  print $fout "\t".$f." += ".$val."\n";
98 >                  if ( $f eq 'LIBDIR'  ||  $f eq 'INCLUDE' )
99 >                     {
100 >                     # Remove duplications:
101 >                     print $fout "\t".$f." := \$(filter-out ".$val.",\$(".$f."))","\n";
102 >                     print $fout "\t".$f." += ".$val."\n";
103 >                     }
104 >                  else
105 >                     {
106 >                     print $fout "\t".$f." += ".$val."\n";
107 >                     }
108                    }
109                 }
110              # -- include any makefiles associated with the tool
# Line 112 | Line 121 | sub _generateexternals
121        print $fout 'LDFLAGS+=$(addprefix -L,$(LIBDIR))'."\n";
122        print $fout 'CPPFLAGS+=$(addprefix -D,$(CPPDEFINES))'."\n";
123        print $fout 'lib+=$(extralib)'."\n";
124 <      print $fout 'LDLIBS+=$(addprefix -l,$(lib))'."\n";
124 >      # Hack to parse the lib list and remove duplicates:
125 >      print $fout 'ORDEREDLIB=$(shell $(SCRAMPERL) $(TOOL_HOME)/ProcessLibs $(lib))',"\n";
126 >      print $fout 'LDLIBS+=$(addprefix -l,$(ORDEREDLIB))'."\n";
127        print $fout 'LDLIBS+=$(addprefix -l,$(REQUIRES))'."\n";
128        print $fout 'LD_LIBRARY_PATH:=$(subst $(space),:,$(LD_LIBRARY_PATH))'."\n";
129 <      
129 >
130        undef $fout;
131        }
132     }
# Line 248 | Line 259 | sub BuildSetup
259     # Do a datestamp check so that make will build files that have changed
260     # rather than just those which are older than their dependencies
261     # The main build here
262 +
263     $rv=system("gmake","--no-print-directory","-r","-k","-f","$ENV{DefaultMakefile}","-I$ENV{TOOL_HOME}",datestamp_config);
264  
265 +   # Be verbose:
266 +   $self->verbose(">> Going to use ".$ENV{DefaultMakefile}." as the default makefile");
267 +  
268     my $gmakejobsflag = "-j";
269     # Temporarily hard-code ncpu as 1:
270     my $ncpu = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines