From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9F1751F56B for ; Mon, 18 Sep 2023 10:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1695032117; bh=mQDXaNNBEj2aBlh/GB7N1rHHQCe6lQ386t26U+467/Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SqiupYVSBnpB8LzeqdIeydUVKW2twKf5PyEExXCybf6yCHruU12ABcQNB0dGTwzLn n+PuskIpQK/x6gTDsAX1hha7/T1TcOwlQ4fYJ9u/lQ+vBe4rGAOOJjy6DARtt/nYch DUilV2ulM6CTxyEaPr+HAzrk1MtPxCT6Ht2oRPws= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 8/8] makefile: avoid non-POSIX which(1) Date: Mon, 18 Sep 2023 10:15:16 +0000 Message-ID: <20230918101516.2477899-9-e@80x24.org> In-Reply-To: <20230918101516.2477899-1-e@80x24.org> References: <20230918101516.2477899-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(