summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSorin Sbarnea <ssbarnea@redhat.com>2019-11-27 19:26:56 +0000
committerSorin Sbarnea <ssbarnea@redhat.com>2019-11-27 19:27:14 +0000
commit7262e545c844b412a263ea717c3f19ba39f110c1 (patch)
tree9c832b1c989a07dc5a1969649612fca015003fa6 /Makefile
parent7605387a70f06b34c22e1dda00092f32c94aaf66 (diff)
downloadpodman-7262e545c844b412a263ea717c3f19ba39f110c1.tar.gz
podman-7262e545c844b412a263ea717c3f19ba39f110c1.tar.bz2
podman-7262e545c844b412a263ea717c3f19ba39f110c1.zip
Detect Python executable in Makefile
`make help` failed on modern platforms that have only python3 executable installed. Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b3566cd1e..dd948fc8e 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@ BUILDTAGS ?= \
exclude_graphdriver_devicemapper \
seccomp \
varlink
+PYTHON ?= $(shell command -v python python3)
GO_BUILD=$(GO) build
# Go module support: set `-mod=vendor` to use the vendored sources
@@ -133,7 +134,7 @@ endef
export PRINT_HELP_PYSCRIPT
help:
- @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
+ @$(PYTHON) -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
.gopathok:
ifeq ("$(wildcard $(GOPKGDIR))","")