user/dev discussion of public-inbox itself
 help / color / 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
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 index

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 publically 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

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror http://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.org/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git