lkml.org 
[lkml]   [2020]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 6/6] selftests: export INSTALL_HDR_PATH if using "O" to specify output dir
Date
When build kvm selftests in tools/testing/selftests directory with

make O=/path/to/kselftests TARGETS=kvm

it fails building some kvm test binaries due to lack of header files.

Export INSTALL_HDR_PATH when "O" is specified, so that sub TARGET can get
the right kernel headers with INSTALL_HDR_PATH.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
tools/testing/selftests/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index be22dbe94a4c..f36bc6fd8086 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -110,6 +110,10 @@ ARCH ?= $(SUBARCH)
export KSFT_KHDR_INSTALL_DONE := 1
export BUILD

+ifneq (1,$(DEFAULT_INSTALL_HDR_PATH))
+export INSTALL_HDR_PATH := $(BUILD)/usr
+endif
+
# build and run gpio when output directory is the src dir.
# gpio has dependency on tools/gpio and builds tools/gpio
# objects in the src directory in all cases making the src
@@ -142,7 +146,7 @@ khdr:
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=$$BUILD/usr \
+ $(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$(INSTALL_HDR_PATH) \
ARCH=$(ARCH) -C $(top_srcdir) headers_install
endif

--
2.20.1
\
 
 \ /
  Last update: 2020-03-25 15:20    [W:0.076 / U:2.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site