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>
This commit is contained in:
Daniel J Walsh 2020-09-21 16:30:54 -04:00
parent dc5cc43563
commit 63ba4ff871
No known key found for this signature in database
GPG key ID: A2DF901DABE2C028

View file

@ -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))","")