summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-09-21 16:30:54 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-09-21 16:32:02 -0400
commit63ba4ff871ae00fa869eb3d290362399e8963105 (patch)
treef47e6c2f17bcb832984c4281140947a0b770a752 /Makefile
parentdc5cc4356362274325a5b4fb2ba8ce71b12544dd (diff)
downloadpodman-63ba4ff871ae00fa869eb3d290362399e8963105.tar.gz
podman-63ba4ff871ae00fa869eb3d290362399e8963105.tar.bz2
podman-63ba4ff871ae00fa869eb3d290362399e8963105.zip
Print nice error message when python is not installed
If user runs `make help` on a system without python, we should print a decent message. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 253207f49..8a75c11fb 100644
--- a/Makefile
+++ b/Makefile
@@ -135,8 +135,13 @@ export PRINT_HELP_PYSCRIPT
err_if_empty = $(if $(strip $($(1))),$(strip $($(1))),$(error Required variable $(1) value is undefined, whitespace, or empty))
.PHONY: help
+ifneq (, ${PYTHON})
help:
@$(PYTHON) -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
+else
+help:
+ $(error python required for 'make help', executable not found)
+endif
.gopathok:
ifeq ("$(wildcard $(GOPKGDIR))","")