Browse Source
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for checked-in source files. It is merely a convention without any functional difference. In fact, $(obj) and $(src) are exactly the same, as defined in scripts/Makefile.build: src := $(obj) When the kernel is built in a separate output directory, $(src) does not accurately reflect the source directory location. While Kbuild resolves this discrepancy by specifying VPATH=$(srctree) to search for source files, it does not cover all cases. For example, when adding a header search path for local headers, -I$(srctree)/$(src) is typically passed to the compiler. This introduces inconsistency between upstream and downstream Makefiles because $(src) is used instead of $(srctree)/$(src) for the latter. To address this inconsistency, this commit changes the semantics of $(src) so that it always points to the directory in the source tree. Going forward, the variables used in Makefiles will have the following meanings: $(obj) - directory in the object tree $(src) - directory in the source tree (changed by this commit) $(objtree) - the top of the kernel object tree $(srctree) - the top of the kernel source tree Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced with $(src). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>master
![masahiroy@kernel.org](/assets/img/avatar_default.png)
102 changed files with 173 additions and 182 deletions
@ -1,4 +1,2 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
dtstree := $(srctree)/$(src)
|
||||
|
||||
dtb-y := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
||||
dtb-y := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
|
||||
|
@ -1,4 +1,3 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
dtstree := $(srctree)/$(src)
|
||||
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
||||
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_420XX) += qat_420xx.o
|
||||
qat_420xx-objs := adf_drv.o adf_420xx_hw_data.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only)
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_4XXX) += qat_4xxx.o
|
||||
qat_4xxx-objs := adf_drv.o adf_4xxx_hw_data.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXX) += qat_c3xxx.o
|
||||
qat_c3xxx-objs := adf_drv.o adf_c3xxx_hw_data.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXXVF) += qat_c3xxxvf.o
|
||||
qat_c3xxxvf-objs := adf_drv.o adf_c3xxxvf_hw_data.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_C62X) += qat_c62x.o
|
||||
qat_c62x-objs := adf_drv.o adf_c62x_hw_data.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_C62XVF) += qat_c62xvf.o
|
||||
qat_c62xvf-objs := adf_drv.o adf_c62xvf_hw_data.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCC) += qat_dh895xcc.o
|
||||
qat_dh895xcc-objs := adf_drv.o adf_dh895xcc_hw_data.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y := -I $(srctree)/$(src)/../qat_common
|
||||
ccflags-y := -I $(src)/../qat_common
|
||||
obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCCVF) += qat_dh895xccvf.o
|
||||
qat_dh895xccvf-objs := adf_drv.o adf_dh895xccvf_hw_data.o
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue