Makefile: use bash to evaluate tool paths
The makefile uses the pattern $(shell command -v path1 path2 ...) to deduce pathnames for various executables. On FreeBSD, the default shell does have a 'command' builtin which supports the '-v' option but only allows a single path as argument. Rather than work around this limitation with alternatives like for, just set bash as the default shell. We already require bash to be installed for various helper scripts. This change only affects FreeBSD so no new tests are needed. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
parent
a575098975
commit
94a634fcfe
5
Makefile
5
Makefile
|
|
@ -51,6 +51,11 @@ BUILDTAGS ?= \
|
|||
$(shell hack/libsubid_tag.sh) \
|
||||
exclude_graphdriver_devicemapper \
|
||||
seccomp
|
||||
ifeq ($(shell uname -s),FreeBSD)
|
||||
# Use bash for make's shell function - the default shell on FreeBSD
|
||||
# has a command builtin is not compatible with the way its used below
|
||||
SHELL := $(shell command -v bash)
|
||||
endif
|
||||
PYTHON ?= $(shell command -v python3 python|head -n1)
|
||||
PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
|
||||
# ~/.local/bin is not in PATH on all systems
|
||||
|
|
|
|||
Loading…
Reference in New Issue