Prefer "command -v" over "which"

This commit is contained in:
Héctor Molinero Fernández 2020-10-21 23:25:18 +02:00
commit 1ac71e150a

View file

@ -6,10 +6,11 @@ SHELL := /bin/sh
FLAGS := ${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W} FLAGS := ${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W}
all: .DEFAULT all: .DEFAULT
.DEFAULT: .DEFAULT:
@which gmake >/dev/null 2>&1 || \ @command -v gmake >/dev/null 2>&1 || \
(printf '%s\n' \ { printf '%s\n' \
"GMake is required to build hBlock." \ "GMake is required to build hBlock." \
"Install it and try again." \ "Install it and try again." >&2 \
&& exit 1) && exit 1; }
@gmake ${.FLAGS} ${.TARGETS} @gmake ${.FLAGS} ${.TARGETS}