From 9fddc98719f3e03c0decd5a17ab567eca6bc4792 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 7 May 2019 23:43:42 +0000 Subject: Makefile.PL: improve make(1) portability The `shell' function appears missing, so we'll rely on Bourne shell expansioN, instead. Use "$?" instead of "$<" since the latter is only specified for inference and .DEFAULT rules, not target rules. Tested on FreeBSD make(1) and bmake(1) on Debian. --- Makefile.PL | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index eda73192..6be913b1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -59,7 +59,7 @@ sub MY::postamble { EATMYDATA = -include config.mak -include Documentation/include.mk -N ?= \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1))) +N = \$\$(( \$\$(nproc 2>/dev/null || gnproc 2>/dev/null || echo 2) + 1 )) SCRIPTS := scripts/ssoma-replay my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES) \$(SCRIPTS)) @@ -70,13 +70,13 @@ my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES) \$(SCRIPTS)) syntax:: \$(my_syntax) check-manifest :: MANIFEST - if git ls-files >\$<.gen 2>&1; then diff -u \$< \$<.gen; fi + if git ls-files >\$?.gen 2>&1; then diff -u \$? \$?.gen; fi check:: pure_all check-manifest \$(EATMYDATA) prove -lv -j\$(N) lib/PublicInbox/UserContent.pm :: contrib/css/216dark.css - @\$(PERL) -I lib \$@ \$< + \$(PERL) -I lib \$@ \$? EOF } -- cgit v1.2.3-24-ge0c7