user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 8/8] makefile: avoid non-POSIX which(1)
  2023-09-18 10:15  4% [PATCH 0/8] portability odds and ends Eric Wong
@ 2023-09-18 10:15  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-09-18 10:15 UTC (permalink / raw)
  To: meta

which(1) isn't in POSIX so it's perhaps less likely to be
available (although I don't think I've noticed a system
without it in decades).  So replace it with the POSIX
`command -v', even though everyone seems to use which...

Add a note about `lexgrog', too, since I'm not sure if it's
packaged for various *BSDs.
---
 Documentation/include.mk | 2 ++
 Makefile.PL              | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/include.mk b/Documentation/include.mk
index eb65454a..86851376 100644
--- a/Documentation/include.mk
+++ b/Documentation/include.mk
@@ -6,6 +6,8 @@ RSYNC = rsync
 RSYNC_DEST = public-inbox.org:/srv/public-inbox/
 AWK = awk
 MAN = man
+
+# part of `man-db' on Debian, not sure about other distros
 LEXGROG = lexgrog
 
 # this is "xml" on FreeBSD and maybe some other distros:
diff --git a/Makefile.PL b/Makefile.PL
index 81992e46..8bd39e6c 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -126,7 +126,7 @@ my %man3 = map {; # semi-colon tells Perl this is a BLOCK (and not EXPR)
 	"lib/PublicInbox/$_" => "blib/man3/PublicInbox::$mod.\$(MAN3EXT)"
 } qw(Git.pm Import.pm WWW.pod SaPlugin/ListMirror.pod);
 my $warn_no_pod = @no_pod ? "\n\t\@echo W: missing .pod: @no_pod\n" : '';
-chomp(my $lexgrog = `which lexgrog 2>/dev/null`);
+chomp(my $lexgrog = `command -v lexgrog 2>/dev/null`);
 my $check_lexgrog = $lexgrog ? 'check-lexgrog' : '';
 
 WriteMakefile(

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/8] portability odds and ends
@ 2023-09-18 10:15  4% Eric Wong
  2023-09-18 10:15  7% ` [PATCH 8/8] makefile: avoid non-POSIX which(1) Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-09-18 10:15 UTC (permalink / raw)
  To: meta

Nothing major, just a few things I noticed while working
on various *BSDs.

Eric Wong (8):
  ci/run: favor `make check' as the default target
  drop GNU nproc(1) support in favor of getconf(1)
  ipc: assume SOCK_SEQPACKET exists
  rename t/run.perl to xt/check-run
  makefile: avoid needless use of double-colon rules
  pop3d: split @FLOCK into $FLOCK_TMPL and @FLOCK_ORDER
  install/deps: more fixes
  makefile: avoid non-POSIX which(1)

 Documentation/include.mk     | 10 ++++++----
 MANIFEST                     |  2 +-
 Makefile.PL                  | 31 +++++++++++++++++--------------
 ci/run.sh                    |  5 +++--
 install/deps.perl            | 17 ++++++++++++-----
 lib/PublicInbox/IPC.pm       | 22 +++++++++-------------
 lib/PublicInbox/POP3D.pm     | 16 ++++++++--------
 t/nntpd.t                    |  2 +-
 t/run.perl => xt/check-run.t |  4 ++--
 9 files changed, 59 insertions(+), 50 deletions(-)
 rename t/run.perl => xt/check-run.t (98%)

^ permalink raw reply	[relevance 4%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-09-18 10:15  4% [PATCH 0/8] portability odds and ends Eric Wong
2023-09-18 10:15  7% ` [PATCH 8/8] makefile: avoid non-POSIX which(1) Eric Wong

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).