about summary refs log tree commit homepage
path: root/Makefile.PL
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-27 11:07:18 +0000
committerEric Wong <e@80x24.org>2019-11-27 11:57:14 +0000
commitd8c459e4a2b4f9da3239d16b649cfeba3f663a7f (patch)
tree115f131a8004c44131ef56a516a711da931ab578 /Makefile.PL
parentd6674af04cb74a4efd513d938bed8bf7ab2838eb (diff)
downloadpublic-inbox-d8c459e4a2b4f9da3239d16b649cfeba3f663a7f.tar.gz
We need to force an update to Makefile (not Makefile.PL) when
MANIFEST changes.  Since "Makefile" (aka. "$(FIRST_MAKEFILE)")
is already a single-colon make target; we can't create a
double-colon rule to augment it.  So we'll continue using a
"Makefile.PL" rule, but have it recreate the resulting Makefile

Finally, change the "check" target to use "prove -b" instead of
"prove -l" so we test against "blib/lib", since what's in the
"blib" dir will be installed.

Fixes: 4c20de0694d06ff3 ("Makefile.PL: add dependency on MANIFEST contents")
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.PL b/Makefile.PL
index f650fdea..4aa0caa7 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -86,13 +86,16 @@ check-manifest :: MANIFEST
         if git ls-files >\$?.gen 2>&1; then diff -u \$? \$?.gen; fi
 
 check:: pure_all check-manifest
-        \$(EATMYDATA) prove -lvw -j\$(N)
+        \$(EATMYDATA) prove -bvw -j\$(N)
 
 lib/PublicInbox/UserContent.pm :: contrib/css/216dark.css
         \$(PERL) -I lib \$@ \$?
 
-# Ensure new .pm files will always be installed:
-Makefile.PL :: MANIFEST
+# Ensure new .pm files will always be installed by updating
+# the timestamp of Makefile.PL which forces Makefile to be remade
+Makefile.PL : MANIFEST
+        touch -r \$< \$@
+        \$(PERLRUN) \$@
 
 EOF
 }