Skip to contentSkip to conversation

Makefile: add kselftest-build target

PATCH New Shuah Khan 1 participant 1 message Apr 19, 2019 Kbuild

lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

PATCH 1/1 Makefile: add kselftest-build target

One of the use-cases is building kselftest and then installing. Adding a target to just build the tests from the main Makefile will help users and makes it easier.

---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)
Makefile +3 -0
index 15c8251d4d5e..38a2ce3c343f 100644
@@ -1195,6 +1195,9 @@ endif
 # ---------------------------------------------------------------------------
 # Kernel selftest
 
+PHONY += kselftest-build
+kselftest-build:
+	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests all
 PHONY += kselftest
 kselftest:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
Signature · 1 line
2.17.1