summaryrefslogtreecommitdiff
path: root/ext/Pod-Functions
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-01-30 12:01:08 +0100
committerNicholas Clark <nick@ccl4.org>2012-02-18 13:16:52 +0100
commit291c8c21fa7694b3f01d0795030f8057228e1db2 (patch)
tree4cecc06f2394b35f791907b6a0b28af83d2d5e8f /ext/Pod-Functions
parent1179df5f52411bc16f719e9134d4978bc0c05cd9 (diff)
downloadperl-291c8c21fa7694b3f01d0795030f8057228e1db2.tar.gz
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.
Diffstat (limited to 'ext/Pod-Functions')
-rw-r--r--ext/Pod-Functions/Makefile.PL20
1 files changed, 19 insertions, 1 deletions
diff --git a/ext/Pod-Functions/Makefile.PL b/ext/Pod-Functions/Makefile.PL
index 64936dc840..ae6dca38d2 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 <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
+}