rt-tests: makefile: undefine PYLIB if empty
PATCH 1/1 rt-tests: makefile: undefine PYLIB if empty
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 <[email protected]>
--- Makefile | 5 +++++ 1 file changed, 5 insertions(+)
Makefile +5 -0
@@ -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 \
Signature · 1 line
2.26.2