The makefile will run a shell command to determine the location of the python libraries. If an error occurs, for example if the system doesn't have python installed on it, undefine PYLIB This prevents undesired side effects such as installing man pages for utilities that will not be installed and does not interfere with other conditionals such as if test -n "${PYLIB]" Signed-off-by: John Kacur <jkacur@xxxxxxxxxx> --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 5f34075a4aa1..24895b7f9697 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,11 @@ LDFLAGS ?= PYLIB ?= $(shell python3 -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_lib())') +# Check for errors, such as python3 not available +ifeq (${PYLIB},) + undefine PYLIB +endif + MANPAGES = src/cyclictest/cyclictest.8 \ src/pi_tests/pi_stress.8 \ src/ptsematest/ptsematest.8 \ -- 2.26.2