lkml.org 
[lkml]   [2022]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/4] Makefile: add headers to kselftest targets
Date
Add headers 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
$ make O=build -C tools/testing/selftests 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>
---

Notes:
v2: replace headers_install with headers

Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 1a6678d817bd..02502cc4ced5 100644
--- a/Makefile
+++ b/Makefile
@@ -1347,10 +1347,10 @@ tools/%: FORCE
# Kernel selftest

PHONY += kselftest
-kselftest:
+kselftest: headers
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests

-kselftest-%: FORCE
+kselftest-%: headers FORCE
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*

PHONY += kselftest-merge
--
2.30.2
\
 
 \ /
  Last update: 2022-07-12 10:30    [W:0.185 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site