In perl.git, the branch smoke-me/nicholas/early-Makefile-bootstrap has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/ed197709cebd1c8affa05c082e52b30b9861f974?hp=8abd6374ff4d4e3baa6f4befa3b08b59cfe6dce5> - Log ----------------------------------------------------------------- commit ed197709cebd1c8affa05c082e52b30b9861f974 Author: Nicholas Clark <[email protected]> Date: Tue Jun 11 21:23:46 2013 +0200 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 ----------------------------------------------------------------------- Summary of changes: Makefile.SH | 26 ++++++++++++++++++-------- vms/descrip_mms.template | 8 +++++--- win32/Makefile | 7 ++++--- win32/makefile.mk | 6 +++--- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Makefile.SH b/Makefile.SH index a18dff0..207e8e2 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) diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index bb5b00c..57ecd4b 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -338,18 +338,20 @@ $(PERLDELTA_CURRENT) : [.pod]perldelta.pod archcorefiles : $(ac) $(ARCHAUTO)time.stamp @ $(NOOP) -[.lib]buildcustomize.pl : write_buildcustomize.pl $(MINIPERL_EXE) - $(MINIPERL) write_buildcustomize.pl > [.lib]buildcustomize.pl +# See the comment in Makefile.SH explaining this seemingly cranky ordering +$(MINIPERL_EXE) : [.lib]buildcustomize.pl + @ $(NOOP) vmspipe.com : [.vms]vmspipe.com Copy/NoConfirm/Log $(MMS$SOURCE) [] miniperl : $(DBG)miniperl$(E) vmspipe.com @ Continue -$(MINIPERL_EXE) : miniperlmain$(O), $(DBG)libperlmini$(OLB) $(CRTL) +[.lib]buildcustomize.pl : miniperlmain$(O), $(DBG)libperlmini$(OLB) $(CRTL) write_buildcustomize.pl [.lib.VMS]Filespec.pm Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoFull/NoCross/Exe=$(MMS$TARGET) miniperlmain$(O), $(DBG)libperlmini$(OLB)/Library/Include=globals $(CRTLOPTS) $(DBG)miniperl$(E) : miniperlmain$(O), $(DBG)libperlmini$(OLB) $(CRTL) Link $(LINKFLAGS)/Trace/Exe=$(MMS$TARGET) miniperlmain$(O), $(DBG)libperlmini$(OLB)/Library/Include=globals $(CRTLOPTS) + $(MINIPERL) write_buildcustomize.pl > [.lib]buildcustomize.pl $(DBG)libperl$(OLB) : $(obj) @ If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET) diff --git a/win32/Makefile b/win32/Makefile index cb3f7df..2e5fb70 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -952,14 +952,15 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl -$(MINIPERL) -I..\lib $(ICWD) config_h.PL if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM) -..\lib\buildcustomize.pl: $(MINIPERL) ..\write_buildcustomize.pl - $(MINIPERL) -I..\lib ..\write_buildcustomize.pl .. >..\lib\buildcustomize.pl +# See the comment in Makefile.SH explaining this seemingly cranky ordering +$(MINIPERL) : ..\lib\buildcustomize.pl -$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) +..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) ..\write_buildcustomize.pl $(LINK32) -subsystem:console -out:$@ @<< $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ) << $(EMBED_EXE_MANI) + $(MINIPERL) -I..\lib ..\write_buildcustomize.pl .. >..\lib\buildcustomize.pl $(MINIDIR) : if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" diff --git a/win32/makefile.mk b/win32/makefile.mk index 57373c2..c99f40a 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1082,11 +1082,11 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl $(MINIPERL) -I..\lib $(ICWD) config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \ || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE) -..\lib\buildcustomize.pl: $(MINIPERL) ..\write_buildcustomize.pl +# See the comment in Makefile.SH explaining this seemingly cranky ordering +$(MINIPERL) : ..\lib\buildcustomize.pl $(MINIPERL) -I..\lib ..\write_buildcustomize.pl .. >..\lib\buildcustomize.pl - -$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) +..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl .IF "$(CCTYPE)" == "GCC" $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST)) -- Perl5 Master Repository
