In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/939767c9d84f9288c260508432b50879f71e1d3b?hp=8525cfaee6f338e972e8c944b87855a29a5b67c3>

- Log -----------------------------------------------------------------
commit 939767c9d84f9288c260508432b50879f71e1d3b
Author: Andy Dougherty <[email protected]>
Date:   Wed Oct 13 13:27:12 2010 -0400

    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.)
-----------------------------------------------------------------------

Summary of changes:
 Makefile.SH       |   22 ++++++++++++++++++----
 utils/Makefile    |    3 +++
 utils/Makefile.SH |   11 ++++++++++-
 x2p/Makefile.SH   |   13 ++++++++++---
 4 files changed, 41 insertions(+), 8 deletions(-)

diff --git a/Makefile.SH b/Makefile.SH
index f886564..6559583 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.
diff --git a/utils/Makefile b/utils/Makefile
index 4d56bea..aaa0b5f 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -1,3 +1,6 @@
+# Generated from utils/Makefile.SH.  The generated file is
+# shipped with the source kit for systems such as win32
+# which don't do .SH extraction.
 
 PERL = ../miniperl
 REALPERL = ../perl
diff --git a/utils/Makefile.SH b/utils/Makefile.SH
index b5a2f12..6601c13 100644
--- a/utils/Makefile.SH
+++ b/utils/Makefile.SH
@@ -26,9 +26,18 @@ esac
 
 echo "Extracting utils/Makefile (with variable substitutions)"
 rm -f Makefile
+# These use the Cwd extension.  For statically-built perls, we
+# need perl, not just miniperl.
+case "$usedl" in
+    define) perl="../miniperl" ;;
+    *)      perl="../perl" ;;
+esac
 cat >Makefile <<!GROK!THIS!
+# Generated from utils/Makefile.SH.  The generated file is
+# shipped with the source kit for systems such as win32
+# which don't do .SH extraction.
 
-PERL = ../miniperl
+PERL = $perl
 REALPERL = ../perl
 RUN = $run  # Used mainly cross-compilation setups.
 
diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH
index 296fdc8..127d6f9 100755
--- a/x2p/Makefile.SH
+++ b/x2p/Makefile.SH
@@ -26,6 +26,14 @@ esac
 
 echo "Extracting x2p/Makefile (with variable substitutions)"
 rm -f Makefile
+
+# The .PL extractions use the Cwd extension.  For statically-built
+# perls, we need perl, not just miniperl.
+case "$usedl" in
+    define) perl="../miniperl" ;;
+    *)      perl="../perl" ;;
+esac
+
 cat >Makefile <<!GROK!THIS!
 # $RCSfile: Makefile.SH,v $$Revision: 4.1 $$Date: 92/08/07 18:29:07 $
 #
@@ -63,6 +71,7 @@ OPTIMIZE = $optimize
 .SUFFIXES: .c \$(OBJ_EXT)
 
 RUN = $run
+PERL = $perl
 
 !GROK!THIS!
 
@@ -173,10 +182,8 @@ hlist:
 shlist:
        echo $(sh) | tr ' ' $(TRNL) >.shlist
 
-# These should be automatically generated
-
 $(plextract):
-       $(RUN) ../miniperl -I../lib [email protected]
+       $(RUN) $(PERL) -I../lib [email protected]
 
 find2perl: find2perl.PL
 

--
Perl5 Master Repository

Reply via email to