42 |
|
'Environment' => \&OutToMakefile, |
43 |
|
'Environment_StartTag' => \&Environment_start, |
44 |
|
'Environment_EndTag' => \&Environment_end, |
45 |
+ |
'export' => \&OutToMakefile, |
46 |
+ |
'export_StartTag' => \&export_start, |
47 |
+ |
'export_EndTag' => \&export_end, |
48 |
|
'lib' => 'none', |
49 |
|
'lib_StartTag' => \&lib_start, |
50 |
|
'lib_EndTag' => 'none', |
80 |
|
# "$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk\n"; |
81 |
|
$ENV{LatestBuildFile}="$ENV{LOCALTOP}/$ENV{INTwork}/${path}/BuildFile.mk"; |
82 |
|
$switch->parse(); # sort out supported tags |
83 |
+ |
if ( $numbins > 0 ) { |
84 |
+ |
print GNUmakefile <<ENDTEXT; |
85 |
+ |
ifndef BINMODE |
86 |
+ |
help:: |
87 |
+ |
\t\@echo Generic Binary targets |
88 |
+ |
\t\@echo ---------------------- |
89 |
+ |
endif |
90 |
+ |
ENDTEXT |
91 |
+ |
foreach $target ( keys %$targettypes ) { |
92 |
+ |
print GNUmakefile <<ENDTEXT; |
93 |
+ |
ifndef BINMODE |
94 |
+ |
help:: |
95 |
+ |
\t\@echo $target |
96 |
+ |
endif |
97 |
+ |
ENDTEXT |
98 |
+ |
} |
99 |
+ |
} |
100 |
|
close GNUmakefile; |
101 |
|
} |
102 |
|
|
206 |
|
|
207 |
|
define stepdown_$$hashref{'name'} |
208 |
|
if [ -d "$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname" ]; then \\ |
189 |
– |
echo - Invoking binary makefile \$\@ for $dirname; \\ |
209 |
|
cd $ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname; \\ |
210 |
|
\$(MAKE) BINMODE=true LatestBuildFile=$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname/BuildFile.mk workdir=\$(workdir)/$dirname -f \$(TOOL_HOME)/basics.mk \$\@; \\ |
211 |
|
fi |
193 |
– |
echo - Finished binary makefile \$\@ |
212 |
|
endef |
213 |
|
|
214 |
|
define stepdown2_$$hashref{'name'} |
215 |
|
if [ -d "$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname" ]; then \\ |
198 |
– |
echo - Invoking binary makefile \$\@ for $dirname; \\ |
216 |
|
cd $ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname; \\ |
217 |
|
\$(MAKE) BINMODE=true LatestBuildFile=$ENV{LOCALTOP}/$ENV{INTwork}/${path}/$dirname/BuildFile.mk workdir=\$(workdir)/$dirname -f \$(TOOL_HOME)/basics.mk \$\*; \\ |
218 |
|
fi |
219 |
< |
echo - Finished binary makefile \$\@ |
219 |
> |
|
220 |
|
endef |
221 |
|
|
222 |
|
bin_$$hashref{'name'}_%:: dummy |
223 |
|
\@\$(stepdown2_$$hashref{'name'}) |
224 |
|
|
225 |
< |
echo_%:: dummy |
225 |
> |
$$hashref{'name'}_%:: dummy |
226 |
|
\@\$(stepdown_$$hashref{'name'}) |
227 |
|
|
228 |
< |
bin bin_debug bin_debug_local bin_insure bin_Insure clean $$hashref{'name'}:: dummy |
228 |
> |
help bin bin_debug bin_debug_local bin_insure bin_Insure clean $$hashref{'name'}:: dummy |
229 |
|
\@\$(stepdown_$$hashref{'name'}) |
230 |
+ |
|
231 |
+ |
binfiles+=$$hashref{'file'} |
232 |
|
endif |
233 |
|
|
234 |
+ |
|
235 |
|
ENDTEXT |
236 |
|
|
237 |
|
|
250 |
|
# debuggging target |
251 |
|
$$hashref{'name'}_echo_% :: echo_% |
252 |
|
|
253 |
+ |
# help targets |
254 |
+ |
help:: |
255 |
+ |
\t\@echo Targets For $$hashref{'name'} |
256 |
+ |
\t\@echo ------------------------------------- |
257 |
+ |
\t\@echo $$hashref{'name'} - default build |
258 |
+ |
\t\@echo bin_$$hashref{'name'}_clean - executable specific cleaning |
259 |
|
ENDTEXT |
260 |
|
|
261 |
|
# Make generic rules for each type |
276 |
|
$target ::$$hashref{name}_$$targettypes{$target} |
277 |
|
|
278 |
|
bintargets+=$$hashref{name}_$$targettypes{$target} |
279 |
+ |
help:: |
280 |
+ |
\t\@echo $$hashref{name}_$$targettypes{$target} |
281 |
|
clean:: |
282 |
|
\t\@if [ -f \$(binarystore)/$$hashref{name}_$$targettypes{$target} ]; then \\ |
283 |
|
\techo Removing \$(binarystore)/$$hashref{name}; \\ |
515 |
|
sub export_start { |
516 |
|
#Set up a toolfile object |
517 |
|
$exporttool=Tool->new(); |
518 |
+ |
print GNUmakefile "ifeq (\$(scram_autoexport),true)\n"; |
519 |
|
} |
520 |
|
|
521 |
|
sub export_end { |
522 |
|
#Write toolfile object to disk |
523 |
|
$exporttool->envtomake(\*GNUmakefile); |
524 |
+ |
print GNUmakefile "endif\n"; |
525 |
|
} |
526 |
|
|
527 |
|
# |