This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a dependency for ext/Pod-Functions/Functions_pm.PL on pod/perlfunc.pod
authorNicholas Clark <nick@ccl4.org>
Mon, 30 Jan 2012 11:01:08 +0000 (12:01 +0100)
committerNicholas Clark <nick@ccl4.org>
Sat, 18 Feb 2012 12:16:52 +0000 (13:16 +0100)
This ensures that it gets re-run, and lib/Pod/Functions.pm rebuilt, if
perlfunc.pod is changed.

Makefile.SH
ext/Pod-Functions/Makefile.PL
vms/descrip_mms.template
win32/Makefile
win32/makefile.mk

index d579dee..0c96f97 100755 (executable)
@@ -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
index 64936dc..ae6dca3 100644 (file)
@@ -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 <perlbug@perl.org>',
              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
+}
index 1e17a39..cf30131 100644 (file)
@@ -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
index 3efc70e..4e81bd0 100644 (file)
@@ -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
 
index 939ac4b..32cfbf1 100644 (file)
@@ -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