diff mbox series

[XEN,v8,37/47] RFC, no-VPATH: build: remove --include-dir option from MAKEFLAGS

Message ID 20211125134006.1076646-38-anthony.perard@citrix.com (mailing list archive)
State Superseded
Headers show
Series xen: Build system improvements, now with out-of-tree build! | expand

Commit Message

Anthony PERARD Nov. 25, 2021, 1:39 p.m. UTC
From: Anthony PERARD <anthony.perard@gmail.com>

File "include/config/auto.conf" and "include/config/auto.conf.cmd"
should be included from the build tree even if they are present in the
source tree. Avoiding to use make's command line option --include-dir
will have make include the right "auto.conf" file. But that mean we
now need to specify $(srctree) for all other Makefile we include.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/Makefile               | 11 +----------
 xen/Rules.mk               |  2 +-
 xen/common/libfdt/Makefile |  2 +-
 xen/scripts/Makefile.clean |  2 +-
 4 files changed, 4 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/xen/Makefile b/xen/Makefile
index e39a6f82859a..fbce0f6771fb 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -153,15 +153,6 @@  ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
 $(error source directory cannot contain spaces or colons)
 endif
 
-ifneq ($(abs_srctree),$(abs_objtree))
-# Look for make include files relative to root of kernel src
-#
-# This does not become effective immediately because MAKEFLAGS is re-parsed
-# once after the Makefile is read. We need to invoke sub-make.
-MAKEFLAGS += --include-dir=$(abs_srctree)
-need-sub-make := 1
-endif
-
 export abs_srctree abs_objtree
 export root-make-done := y
 
@@ -225,7 +216,7 @@  ifneq ($(filter %config,$(MAKECMDGOALS)),)
     config-build := y
 endif
 
-include scripts/Kbuild.include
+include $(srctree)/scripts/Kbuild.include
 
 ARCH=$(XEN_TARGET_ARCH)
 SRCARCH=$(shell echo $(ARCH) | \
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 745d892d0707..45d2b72158b8 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -104,7 +104,7 @@  noubsan-y       := $(addprefix $(obj)/,$(noubsan-y))
 # $(sort ...) is used here to remove duplicated words and excessive spaces.
 hostprogs-y := $(sort $(hostprogs-y))
 ifneq ($(hostprogs-y),)
-include scripts/Makefile.host
+include $(srctree)/scripts/Makefile.host
 endif
 
 # subdir-builtin may contain duplications. Use $(sort ...)
diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile
index 75aaefa2e37f..8d484063753b 100644
--- a/xen/common/libfdt/Makefile
+++ b/xen/common/libfdt/Makefile
@@ -1,4 +1,4 @@ 
-include $(src)/Makefile.libfdt
+include $(srcdir)/Makefile.libfdt
 
 SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
 OBJCOPYFLAGS := $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s))
diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean
index 53f7a76b3075..fa5f332e49a0 100644
--- a/xen/scripts/Makefile.clean
+++ b/xen/scripts/Makefile.clean
@@ -12,7 +12,7 @@  clean::
 
 include $(srctree)/scripts/Kbuild.include
 
-include $(src)/Makefile
+include $(srcdir)/Makefile
 
 # Figure out what we need to clean from the various variables
 # ==========================================================================