87 |
|
print $fout 'LDLIBS+=$(addprefix -l,$(REQUIRES))'."\n"; |
88 |
|
|
89 |
|
undef $fout; |
90 |
+ |
$self->verbose("End Configuration Setup"); |
91 |
|
} |
92 |
|
} |
93 |
|
|
125 |
|
elsif ( -e $ENV{RELEASETOP}."/".$projectfile ) { |
126 |
|
$ENV{projectfile}=$ENV{RELEASETOP}."/".$projectfile; |
127 |
|
} |
128 |
< |
if ( $DefaultBuildFile eq "" ) { |
129 |
< |
# Map Relevant makefile classmakefile directory |
130 |
< |
my $classmakefile=$ENV{projconfigdir}."/".$Class."_makefile.mk"; |
131 |
< |
if ( -e $ENV{LOCALTOP}."/".$classmakefile ) { |
132 |
< |
$ENV{classmakefile}=$ENV{LOCALTOP}."/".$classmakefile; |
133 |
< |
} |
134 |
< |
elsif ( -e $ENV{RELEASETOP}."/".$classmakefile ) { |
135 |
< |
$ENV{classmakefile}=$ENV{RELEASETOP}."/".$classmakefile; |
128 |
> |
if ( (! defined $DefaultBuildFile) || ($DefaultBuildFile eq "") ) { |
129 |
> |
# -- Create a makefile from the class BuildFile |
130 |
> |
my $classbuildfile=$ENV{LOCALTOP}."/". |
131 |
> |
$ENV{projconfigdir}."/".$Class."_BuildFile"; |
132 |
> |
$self->verbose("Processing Class BuildFile $classbuildfile"); |
133 |
> |
my $classmakefile; |
134 |
> |
if ( -f $classbuildfile ) { |
135 |
> |
$classmakefile=$ENV{LOCALTOP}."/".$ENV{INTwork}. |
136 |
> |
"/".$Class."_makefile.mk"; |
137 |
> |
if ( SCRAMUtils::dated($classmakefile, $classbuildfile) ) { |
138 |
> |
# -- generate the new makefile if out of date |
139 |
> |
$self->verbose("Generating $classmakefile from $classbuildfile"); |
140 |
> |
my $classbf=BuildSystem::BuildFile->new($self->{toolbox}); |
141 |
> |
$classbf->GenerateMakefile($classbuildfile, $classmakefile); |
142 |
> |
} |
143 |
|
} |
144 |
|
else { |
145 |
< |
print "\nUnable to locate $classmakefile\n"; |
146 |
< |
print " Not in $ENV{LOCALTOP}\n"; |
147 |
< |
print " Not in $ENV{RELEASETOP}\n"; |
148 |
< |
exit 1; |
145 |
> |
$classmakefile=$ENV{LOCALTOP}."/". |
146 |
> |
$ENV{projconfigdir}."/".$Class."_makefile.mk"; |
147 |
> |
if ( ! -f $classmakefile ) { |
148 |
> |
$self->error("Unable to find matching ".$Class."_BuildFile or ". |
149 |
> |
$Class."_makefile.mk"); |
150 |
> |
} |
151 |
|
} |
152 |
< |
$DefaultBuildFile=$ENV{classmakefile}; # TODO - only for override |
153 |
< |
} |
152 |
> |
# Map Relevant makefile classmakefile directory |
153 |
> |
$ENV{classmakefile}=$classmakefile; |
154 |
> |
$DefaultBuildFile=$ENV{classmakefile}; |
155 |
> |
} |
156 |
|
|
157 |
|
$ENV{ClassDir}=$ClassDir; |
158 |
|
$ENV{Class}=$Class; |