From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 36A551F4AB for ; Thu, 9 May 2019 07:51:05 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 7/9] Makefile.PL: improve make(1) portability Date: Thu, 9 May 2019 07:51:01 +0000 Message-Id: <20190509075103.27132-8-e@80x24.org> In-Reply-To: <20190509075103.27132-1-e@80x24.org> References: <20190509075103.27132-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 eda7319..6be913b 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 } -- EW