summaryrefslogtreecommitdiff
path: root/Makefile.SH
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2010-10-13 13:27:12 -0400
committerAndy Dougherty <doughera@lafayette.edu>2010-10-14 08:29:43 -0400
commit939767c9d84f9288c260508432b50879f71e1d3b (patch)
tree749772a89363c6cb9d6e7cf28bbd24045e93e764 /Makefile.SH
parent8525cfaee6f338e972e8c944b87855a29a5b67c3 (diff)
downloadperl-939767c9d84f9288c260508432b50879f71e1d3b.tar.gz
Fix x2p and utils dependencies for static builds
The x2p and utils .PL extractions use the Cwd module, which is not available in miniperl in a static build. (For a dynamic build, miniperl only loads the pure perl portion of Cwd, but building the whole extension ensures that the pure perl part is correctly built and available. It might be cleaner just to always require the full perl.)
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-xMakefile.SH22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile.SH b/Makefile.SH
index f886564046..65595835ef 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -562,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) 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.