Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: enforce local header dependency in lib.mk

Add local header dependency in lib.mk. This enforces the dependency
blindly even when a test doesn't include the file, with the benefit
of a simpler common logic without requiring individual tests to have
special rule for it.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

+2 -1
+2 -1
tools/testing/selftests/lib.mk
··· 134 134 # Selftest makefiles can override those targets by setting 135 135 # OVERRIDE_TARGETS = 1. 136 136 ifeq ($(OVERRIDE_TARGETS),) 137 - $(OUTPUT)/%:%.c 137 + LOCAL_HDRS := $(selfdir)/kselftest_harness.h $(selfdir)/kselftest.h 138 + $(OUTPUT)/%:%.c $(LOCAL_HDRS) 138 139 $(LINK.c) $^ $(LDLIBS) -o $@ 139 140 140 141 $(OUTPUT)/%.o:%.S