aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDoug Rabson <dfr@rabson.org>2022-06-28 08:02:13 +0100
committerDoug Rabson <dfr@rabson.org>2022-06-28 10:29:50 +0100
commit94a634fcfe32da09493cc6dc0d04d568121bc202 (patch)
tree0bdb5c14fd7cc0aa0b10cabf3f3426db938785a5 /Makefile
parenta5750989752d03717676adc3e5ad52547afab421 (diff)
downloadpodman-94a634fcfe32da09493cc6dc0d04d568121bc202.tar.gz
podman-94a634fcfe32da09493cc6dc0d04d568121bc202.tar.bz2
podman-94a634fcfe32da09493cc6dc0d04d568121bc202.zip
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3ed522b32..4fe928bad 100644
--- a/Makefile
+++ b/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