From ad8490240e855c7e08a64de06e96bf2ed7d7725a Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 27 Jun 2022 10:22:54 +0100 Subject: [PATCH] Makefile: drop usage of 'which' `which` is an external command which isn't required by POSIX. Debian and other distributions (like Gentoo!) are looking to drop it from their base set of packages. Switch to `command -v` which should always work instead. Signed-off-by: Sam James --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 47ffe788..92ce9348 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ manhtml: # Flex and Bison %.c: %.y - @if ! which $(BISON) 2> /dev/null ; then \ + @if ! command -v $(BISON) 2> /dev/null ; then \ echo "Please install $(BISON), then run \"make clean\" and try again" ; \ false ; \ fi @@ -280,7 +280,7 @@ FLEX_FLAGS := -Psensors_yy -t -Cfe -8 endif %.c: %.l - @if ! which $(FLEX) 2> /dev/null ; then \ + @if ! command -v $(FLEX) 2> /dev/null ; then \ echo "Please install $(FLEX), then run \"make clean\" and try again" ; \ false ; \ fi