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[RFC v3 2/3] kvm: selftests: Use the right INSTALL_HDR_PATH when OUTPUT specified and MAKELEVEL is 0
Date
Assume linux headers exist in linux_src/usr works with OUTPUT specified
currently, even though headers are installed to $(OUTPUT)/usr based on
lib.mk. Because there are building output in linux_src/usr when
"make headers_install" to prepare headers and they are not cleaned.

Assign the correct path to INSTALL_HDR_PATH is always not bad.

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

diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index 91b41092def6..6a95878b2ab7 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -43,7 +43,15 @@ TEST_GEN_PROGS_s390x += kvm_create_max_vcpus
TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(UNAME_M))
LIBKVM += $(LIBKVM_$(UNAME_M))

-INSTALL_HDR_PATH = $(top_srcdir)/usr
+ifeq (0,$(MAKELEVEL))
+ ifneq ($(OUTPUT),)
+ INSTALL_HDR_PATH := $(OUTPUT)/usr
+ else
+ INSTALL_HDR_PATH := $(top_srcdir)/usr
+ endif
+else
+ INSTALL_HDR_PATH := $(top_srcdir)/usr
+endif
LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
LINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include
LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/x86/include
--
2.20.1
\
 
 \ /
  Last update: 2020-03-26 04:26    [W:0.136 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site