diff options
author | Shuah Khan <skhan@linuxfoundation.org> | 2020-03-26 02:16:49 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2020-03-27 00:29:55 +0300 |
commit | 1056d3d2c97e47397d0037cbbdf24235ae8f88cb (patch) | |
tree | ac71c6ab6e07b64f130f06a8f668e457ab6c2435 /tools | |
parent | d3fd949abd3e3005dab7ccb185c3c8bc0ad639f1 (diff) | |
download | linux-1056d3d2c97e47397d0037cbbdf24235ae8f88cb.tar.xz |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/lib.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 1c8a1963d03f..70f03dff5479 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -134,7 +134,8 @@ endif # Selftest makefiles can override those targets by setting # OVERRIDE_TARGETS = 1. ifeq ($(OVERRIDE_TARGETS),) -$(OUTPUT)/%:%.c +LOCAL_HDRS := $(selfdir)/kselftest_harness.h $(selfdir)/kselftest.h +$(OUTPUT)/%:%.c $(LOCAL_HDRS) $(LINK.c) $^ $(LDLIBS) -o $@ $(OUTPUT)/%.o:%.S |