This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta up to c3b19b5c6
[perl5.git] / Makefile.SH
index df310c6..998a6ee 100755 (executable)
@@ -440,14 +440,7 @@ sh = Makefile.SH cflags.SH config_h.SH makeaperl.SH makedepend.SH \
 shextract = Makefile cflags config.h makeaperl makedepend \
        makedir myconfig writemain pod/Makefile
 
-# Files to be built with variable substitution after miniperl is
-# available.  Dependencies handled manually below (for now).
-
-pl =
-
-plextract =
-
-addedbyconf = UU $(shextract) $(plextract) pstruct
+addedbyconf = UU $(shextract) pstruct
 
 # Unicode data files generated by mktables
 unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \
@@ -569,16 +562,30 @@ lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
 # make sure that we recompile perl.c if the git version changes
 perl$(OBJ_EXT): git_version.h
 
-translators:   $(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE
-       @echo " "; echo "       Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
-
 !NO!SUBS!
 
+# Making utilities and translators require Cwd.  If we have dynamic
+# loading, we only need miniperl and Cwd.$dlext.  If we have static
+# loading, we need to build perl first.
+case "$usedl" in
+define)
+    util_deps='$(MINIPERL_EXE) $(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE'
+     x2p_deps='$(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE'
+    ;;
+*)  util_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
+     x2p_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
+    ;;
+esac
+
 $spitshell >>$Makefile <<!GROK!THIS!
-utilities:     \$(MINIPERL_EXE) \$(CONFIGPM) \$(plextract) FORCE lib/auto/Cwd/Cwd.$dlext
+translators:   $x2p_deps
+       @echo " "; echo "       Making x2p stuff"; cd x2p; \$(LDLIBPTH) \$(MAKE) all
+
+utilities:     $util_deps
        @echo " "; echo "       Making utilities"; cd utils; \$(LDLIBPTH) \$(MAKE) all
 
 !GROK!THIS!
+
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
 # This is now done by installman only if you actually want the man pages.
@@ -998,10 +1005,6 @@ lib/re.pm: ext/re/re.pm
        @-rm -f $@
        cp ext/re/re.pm lib/re.pm
 
-$(plextract):  $(MINIPERL_EXE) $(CONFIGPM) x2p/s2p $(dynamic_ext)
-       @-rm -f $@
-       $(MINIPERL) $@.PL
-
 x2p/s2p: $(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) x2p/s2p.PL
        cd x2p; $(LDLIBPTH) $(MAKE) s2p
 
@@ -1312,7 +1315,7 @@ _cleaner2:
        -rmdir lib/Package lib/Params
        -rmdir lib/Pod/Perldoc lib/Pod/Simple lib/Pod/Text
        -rmdir lib/Sys lib/Scalar/Util lib/Scalar
-       -rmdir lib/Term/UI lib/Thread
+       -rmdir lib/Term/UI lib/Thread lib/Tie/Hash
        -rmdir lib/Test/Builder/Tester lib/Test/Builder lib/Test
        -rmdir lib/Unicode/Collate
        -rmdir lib/XS/APItest lib/XS
@@ -1530,7 +1533,7 @@ noknack:  utilities
 nokfilenack:   utilities
        $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
 
-.PHONY: clist hlist shlist pllist
+.PHONY: clist hlist shlist
 
 clist: $(c)
        echo $(c) | tr ' ' $(TRNL) >.clist
@@ -1541,9 +1544,6 @@ hlist:  $(h)
 shlist: $(sh)
        echo $(sh) | tr ' ' $(TRNL) >.shlist
 
-pllist: $(pl)
-       echo $(pl) | tr ' ' $(TRNL) >.pllist
-
 Makefile: Makefile.SH ./config.sh
        $(SHELL) Makefile.SH