From 7262e545c844b412a263ea717c3f19ba39f110c1 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 27 Nov 2019 19:26:56 +0000 Subject: Detect Python executable in Makefile `make help` failed on modern platforms that have only python3 executable installed. Signed-off-by: Sorin Sbarnea --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))","") -- cgit v1.2.3-54-g00ecf