summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2022-07-08 19:23:30 +0300
committerShuah Khan <skhan@linuxfoundation.org>2022-07-12 02:23:42 +0300
commit67bd292cd281be2216cd269c161be31cd3ccf196 (patch)
treeefa0d1cecf6cf3174dd5cdd56d6f30ae9f0b2b42 /Makefile
parent49de12ba06efcba76332054379830f9d04541492 (diff)
downloadlinux-67bd292cd281be2216cd269c161be31cd3ccf196.tar.xz
Makefile: add headers_install to kselftest targets
Add headers_install as a dependency to kselftest targets so that they can be run directly from the top of the tree. The kselftest Makefile used to try to call headers_install "backwards" but failed due to the relative path not being consistent. Now we can either run this directly: $ make O=build kselftest-all or this: $ make O=build headers_install $ make O=build -C tools/testing/selftest all The same commands work as well when building directly in the source tree (no O=) or any arbitrary path (relative or absolute). Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Tested-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8973b285ce6c..fb2f3bb53a6b 100644
--- a/Makefile
+++ b/Makefile
@@ -1347,10 +1347,10 @@ tools/%: FORCE
# Kernel selftest
PHONY += kselftest
-kselftest:
+kselftest: headers_install
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
-kselftest-%: FORCE
+kselftest-%: headers_install FORCE
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
PHONY += kselftest-merge