]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
makefile: avoid non-POSIX which(1)
authorEric Wong <e@80x24.org>
Mon, 18 Sep 2023 10:15:16 +0000 (10:15 +0000)
committerEric Wong <e@80x24.org>
Wed, 20 Sep 2023 19:14:26 +0000 (19:14 +0000)
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
Makefile.PL

index eb65454a1a0f11dc3e001b0db01080fed2459597..86851376b82afac7925876da249c79cdddd32728 100644 (file)
@@ -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:
index 81992e464b06618003912cb1b5981372adc1a7c8..8bd39e6c5d1dd680373c395bc5268e26bb1ef142 100644 (file)
@@ -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(