diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-06-11 21:23:46 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-06-13 15:19:21 +0200 |
commit | cb251201d6951395845f27476706749c5c0e12f7 (patch) | |
tree | d4375ec8bc699e4f1f13c2fd202016307bf5e39f /Makefile.SH | |
parent | 5c39bf1981fd94f2f7d0c551c307701ce0faeda6 (diff) | |
download | perl-cb251201d6951395845f27476706749c5c0e12f7.tar.gz |
Generate lib/buildcustomize.pl at the same time as the miniperl executable.
Doing them together ensures that we always have lib/buildcustomize.pl
available. This simplifies things. The seemingly cranky ordering of having
miniperl notionally depend on lib/buildcustomize.pl, and the rule for
lib/buildcustomize.pl actually also building miniperl permits the rest of
the Makefile to depend on (the obvious) miniperl, not the obscure
lib/buildcustomize.pl
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-x | Makefile.SH | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/Makefile.SH b/Makefile.SH index a18dff045c..207e8e21bb 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -851,21 +851,32 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT) # build problems but that's not obvious to the novice. # The Module used here must not depend on Config or any extensions. +# The seemingly cranky ordering of having $(MINIPERL_EXE) depend on +# lib/buildcustomize.pl despite the reality that lib/buildcustomize.pl needs +# miniperl to exist first permits us to +# a) have one rule generate both miniperl and lib/buildcustomize.pl +# (so that lib/buildcustomise.pl is always available. This simplifies things) +# b) have the rest of the Makefile depend on the more obvious $(MINIPERL_EXE) + +$(MINIPERL_EXE): lib/buildcustomize.pl + !NO!SUBS! case "${osname}${osvers}" in aix*) $spitshell >>$Makefile <<'!NO!SUBS!' -$(MINIPERL_EXE): $& $(mini_obj) +lib/buildcustomize.pl: $& $(mini_obj) $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(mini_obj) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest + $(MINIPERL) write_buildcustomize.pl >lib/buildcustomize.pl !NO!SUBS! ;; next4*) $spitshell >>$Makefile <<'!NO!SUBS!' -$(MINIPERL_EXE): $& $(mini_obj) +lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl $(CC) -o $(MINIPERL_EXE) $(mini_obj) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest + $(MINIPERL) write_buildcustomize.pl >lib/buildcustomize.pl !NO!SUBS! ;; darwin*) @@ -882,27 +893,29 @@ NAMESPACEFLAGS = -force_flat_namespace ;; esac $spitshell >>$Makefile <<'!NO!SUBS!' -$(MINIPERL_EXE): $& $(mini_obj) +lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl -@rm -f miniperl.xok $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \ $(mini_obj) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest + $(MINIPERL) write_buildcustomize.pl >lib/buildcustomize.pl !NO!SUBS! ;; *) $spitshell >>$Makefile <<'!NO!SUBS!' -$(MINIPERL_EXE): $& $(mini_obj) +lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl -@rm -f miniperl.xok $(LDLIBPTH) $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ $(mini_obj) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest + $(MINIPERL) write_buildcustomize.pl >lib/buildcustomize.pl !NO!SUBS! ;; esac $spitshell >>$Makefile <<'!NO!SUBS!' -$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) +$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl -@rm -f miniperl.xok $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) @@ -1057,9 +1070,6 @@ $(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git lib/ExtUtils/Miniperl.pm: miniperlmain.c $(MINIPERL_EXE) minimod.pl $(CONFIGPM) $(MINIPERL) minimod.pl > lib/ExtUtils/Miniperl.pm -lib/buildcustomize.pl: $(MINIPERL_EXE) write_buildcustomize.pl - $(MINIPERL) write_buildcustomize.pl >lib/buildcustomize.pl - unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext) |