user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 7/9] Makefile.PL: improve make(1) portability
Date: Thu,  9 May 2019 07:51:01 +0000	[thread overview]
Message-ID: <20190509075103.27132-8-e@80x24.org> (raw)
In-Reply-To: <20190509075103.27132-1-e@80x24.org>

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


  parent reply	other threads:[~2019-05-09  7:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09  7:50 [PATCH 0/9] install updates Eric Wong
2019-05-09  7:50 ` [PATCH 1/9] INSTALL: update with FreeBSD pkg names and reorder Eric Wong
2019-05-09  7:50 ` [PATCH 2/9] INSTALL: depend on Encode instead of Encode::MIME::Header Eric Wong
2019-05-09  7:50 ` [PATCH 3/9] INSTALL: note xapian-compact(1) tool Eric Wong
2019-05-09  7:50 ` [PATCH 4/9] t/purge.t: fix unreferenced variable Eric Wong
2019-05-09  7:50 ` [PATCH 5/9] doc: use bullet list for wwwlisting options Eric Wong
2019-05-09  7:51 ` [PATCH 6/9] doc: give txt files proper titles Eric Wong
2019-05-09  7:51 ` Eric Wong [this message]
2019-05-09  7:51 ` [PATCH 8/9] doc/include.mk: remove git use and redundant declarations Eric Wong
2019-05-09  7:51 ` [PATCH 9/9] ci: include some scripts to make CI easier Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190509075103.27132-8-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).