summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-02-28 09:10:26 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2021-03-15 13:20:48 +0300
commit3204a7fb98a3bccd0004ea0f2769fbeadc2c2dba (patch)
tree372f0332ba14c0b15f7be566b0a48780e0abcb87 /Makefile
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff)
downloadlinux-3204a7fb98a3bccd0004ea0f2769fbeadc2c2dba.tar.xz
kbuild: prefix $(srctree)/ to some included Makefiles
VPATH is used in Kbuild to make pattern rules search for prerequisites in both $(objtree) and $(srctree). Some of *.c, *.S files are not real sources, but generated by tools such as flex, bison, perl. In contrast, I doubt the benefit of --include-dir=$(abs_srctree) because it is always clear which Makefiles are real sources, and which are not. So, my hope is to add $(srctree)/ prefix to all check-in Makefiles, then remove --include-dir=$(abs_srctree) flag in the future. I am touching only some Kbuild core parts for now. Treewide fixes will be needed to achieve this goal. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a28bb374663d..93e6e2d28d89 100644
--- a/Makefile
+++ b/Makefile
@@ -339,14 +339,14 @@ __build_one_by_one:
else # !mixed-build
-include scripts/Kbuild.include
+include $(srctree)/scripts/Kbuild.include
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
-include scripts/subarch.include
+include $(srctree)/scripts/subarch.include
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
@@ -592,7 +592,7 @@ ifdef config-build
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
-include arch/$(SRCARCH)/Makefile
+include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT
config: outputmakefile scripts_basic FORCE
@@ -679,7 +679,7 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc
export RETPOLINE_CFLAGS
export RETPOLINE_VDSO_CFLAGS
-include arch/$(SRCARCH)/Makefile
+include $(srctree)/arch/$(SRCARCH)/Makefile
ifdef need-config
ifdef may-sync-config