In perl.git, the branch smoke-me/Pod-Functions has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/979b65a9795db7b091a432c9c8364952112b6bb1?hp=a70ccde310c8cc73e254d89a89824b27f4240364>

- Log -----------------------------------------------------------------
commit 979b65a9795db7b091a432c9c8364952112b6bb1
Author: Nicholas Clark <[email protected]>
Date:   Mon Jan 30 12:01:08 2012 +0100

    Add a dependency for ext/Pod-Functions/Functions_pm.PL on pod/perlfunc.pod
    
    This ensures that it gets re-run, and lib/Pod/Functions.pm rebuilt, if
    perlfunc.pod is changed.
-----------------------------------------------------------------------

Summary of changes:
 Makefile.SH                   |    2 +-
 ext/Pod-Functions/Makefile.PL |   20 +++++++++++++++++++-
 vms/descrip_mms.template      |    2 +-
 win32/Makefile                |    2 +-
 win32/makefile.mk             |    2 +-
 5 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/Makefile.SH b/Makefile.SH
index 73ea6ec..b98fb53 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -178,7 +178,7 @@ done
 dynamic_list=' '
 dynamic_ext_re="lib/auto/re/re.$dlext"
 extra_dep='
-ext/Pod-Functions/pm_to_blib: cpan/Pod-Simple/pm_to_blib
+ext/Pod-Functions/pm_to_blib: cpan/Pod-Simple/pm_to_blib pod/perlfunc.pod
 '
 for f in $dynamic_ext; do
     : the dependency named here will never exist
diff --git a/ext/Pod-Functions/Makefile.PL b/ext/Pod-Functions/Makefile.PL
index 64936dc..ae6dca3 100644
--- a/ext/Pod-Functions/Makefile.PL
+++ b/ext/Pod-Functions/Makefile.PL
@@ -2,6 +2,7 @@
 
 use strict;
 use ExtUtils::MakeMaker;
+use File::Spec::Functions;
 
 WriteMakefile(NAME => 'Pod::Functions',
              VERSION_FROM => 'Functions_pm.PL',
@@ -10,7 +11,24 @@ WriteMakefile(NAME => 'Pod::Functions',
              ABSTRACT_FROM => 'Functions_pm.PL',
              AUTHOR => 'Perl 5 Porters <[email protected]>',
              INSTALLDIRS => 'perl',
-             PL_FILES => {'Functions_pm.PL' => 'Functions.pm'},
+             PL_FILES => {}, # Stop EU::MM defaulting this to run our PL
              PM => {'Functions.pm' => '$(INST_LIBDIR)/Functions.pm'},
              clean => {FILES => 'Functions.pm'},
             );
+
+# There doesn't seem to be any way to get ExtUtils::MakeMaker to add a
+# dependency on another file (or target), and as it's using :: rules, not :
+# rules, then we can't simply add a one line dependency. So we need to provide
+# the entire thing. Fortunately, the same code in MM_Unix.pm is actually used
+# for all platforms, so this code below should also be portable:
+
+sub MY::postamble {
+    my $pf = catfile(updir, updir, 'pod', 'perlfunc.pod');
+    return <<"EOT";
+all :: Functions.pm
+       \$(NOECHO) \$(NOOP)
+
+Functions.pm :: Functions_pm.PL $pf
+       \$(PERLRUN) Functions_pm.PL $pf
+EOT
+}
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template
index 1e17a39..cf30131 100644
--- a/vms/descrip_mms.template
+++ b/vms/descrip_mms.template
@@ -468,7 +468,7 @@ DynaLoader$(O) : [.lib]buildcustomize.pl 
$(ARCHDIR)Config.pm $(MINIPERL_EXE) [.l
 dynext : $(LIBPREREQ) $(DBG)perlshr$(E) unidatafiles.ts DynaLoader$(O) 
preplibrary makeppport $(MINIPERL_EXE)
        $(MINIPERL) make_ext.pl "MAKE=$(MMS)" "--dynamic" "--static"
 
-nonxsext : $(LIBPREREQ) preplibrary $(MINIPERL_EXE)
+nonxsext : $(LIBPREREQ) preplibrary $(MINIPERL_EXE) [.pod]perlfunc.pod
        $(MINIPERL) make_ext.pl "MAKE=$(MMS)" "--nonxs"
 
 [.lib.VMS]Filespec.pm : [.vms.ext]Filespec.pm
diff --git a/win32/Makefile b/win32/Makefile
index e469396..89b0daa 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -1010,7 +1010,7 @@ Extensions_static : ..\make_ext.pl 
..\lib\buildcustomize.pl list_static_libs.pl
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) 
--dir=$(DISTDIR) --dir=$(EXTDIR) --static
        $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
-Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) 
$(CONFIGPM)
+Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) 
$(CONFIGPM) ..\pod\perlfunc.pod
        $(XCOPY) ..\*.h $(COREDIR)\*.*
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) 
--dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
 
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 95c42a6..193f45d 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1198,7 +1198,7 @@ Extensions_static : ..\make_ext.pl 
..\lib\buildcustomize.pl list_static_libs.pl
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) 
--dir=$(DISTDIR) --dir=$(EXTDIR) --static
        $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
-Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) 
$(CONFIGPM)
+Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) 
$(CONFIGPM) ..\pod\perlfunc.pod
        $(XCOPY) ..\*.h $(COREDIR)\*.*
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) 
--dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
 

--
Perl5 Master Repository

Reply via email to