[PATCH v2 5/6] selftests: Generate build output of linux headers to $(OUTPUT)/linux-header-build

From: Xiaoyao Li
Date: Wed Mar 25 2020 - 10:19:28 EST


When build linux headers for selftests with OUTPUT specified, it makes
linux src tree not clean.

Fix it by generating the output file of "headers_install" to a fixed dir
in $(OUTPUT).

Signed-off-by: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
---
tools/testing/selftests/lib.mk | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index b51ff93da4de..bb830e4817fc 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -66,6 +66,7 @@ ifeq (1,$(DEFAULT_INSTALL_HDR_PATH))
make --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install
else
make --no-builtin-rules INSTALL_HDR_PATH=$(INSTALL_HDR_PATH) \
+ O=$(OUTPUT)/linux-header-build \
ARCH=$(ARCH) -C $(top_srcdir) headers_install
endif
endif
--
2.20.1