rt-tests: Skip feature tests on non-build targets
PATCH 1/1 rt-tests: Skip feature tests on non-build targets
Do not check for dependencies when not building anything, i.e. on clean, distclean, and tarball targets.
Inspired by a similar check in rtla.
Suggested-by John Kacur <[email protected]>
Signed-off-by Tomas Glozar <[email protected]>
--- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Makefile +12 -0
@@ -39,6 +39,17 @@ LDFLAGS ?= PYLIB ?= $(shell python3 -m get_pylib) +# Check for dependencies only when building +NON_CONFIG_TARGETS := clean distclean tarball + +config := 1 +ifdef MAKECMDGOALS +ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),) + config := 0 +endif +endif + +ifeq ($(config),1) # Check for optional libcpupower dependency ifneq ($(no_libcpupower), 1) ifeq ($(call test-feature,libcpupower), 0)
@@ -51,6 +62,7 @@ endif else $(warning libcpupower disabled, building without --deepest-idle-state support.) endif +endif # Check for errors, such as python3 not available ifeq (${PYLIB},)
Signature · 1 line
2.47.1