[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200325140133.103236-7-xiaoyao.li@intel.com>
Date: Wed, 25 Mar 2020 22:01:33 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Shuah Khan <shuah@...nel.org>, Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, Xiaoyao Li <xiaoyao.li@...el.com>
Subject: [PATCH v2 6/6] selftests: export INSTALL_HDR_PATH if using "O" to specify output dir
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@...el.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
Powered by blists - more mailing lists