Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: use $(src) instead of $(srctree)/$(src) for source directory

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>

+173 -182
+4 -4
Documentation/Makefile
··· 76 76 # * dest folder relative to $(BUILDDIR) and 77 77 # * cache folder relative to $(BUILDDIR)/.doctrees 78 78 # $4 dest subfolder e.g. "man" for man pages at userspace-api/media/man 79 - # $5 reST source folder relative to $(srctree)/$(src), 79 + # $5 reST source folder relative to $(src), 80 80 # e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media 81 81 82 82 quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) 83 83 cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \ 84 84 PYTHONDONTWRITEBYTECODE=1 \ 85 - BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ 85 + BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(src)/$5/$(SPHINX_CONF)) \ 86 86 $(PYTHON3) $(srctree)/scripts/jobserver-exec \ 87 87 $(CONFIG_SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \ 88 88 $(SPHINXBUILD) \ 89 89 -b $2 \ 90 - -c $(abspath $(srctree)/$(src)) \ 90 + -c $(abspath $(src)) \ 91 91 -d $(abspath $(BUILDDIR)/.doctrees/$3) \ 92 92 -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \ 93 93 $(ALLSPHINXOPTS) \ 94 - $(abspath $(srctree)/$(src)/$5) \ 94 + $(abspath $(src)/$5) \ 95 95 $(abspath $(BUILDDIR)/$3/$4) && \ 96 96 if [ "x$(DOCS_CSS)" != "x" ]; then \ 97 97 cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \
+3 -3
Documentation/devicetree/bindings/Makefile
··· 25 25 $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE 26 26 $(call if_changed,extract_ex) 27 27 28 - find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ 28 + find_all_cmd = find $(src) \( -name '*.yaml' ! \ 29 29 -name 'processed-schema*' \) 30 30 31 31 find_cmd = $(find_all_cmd) | \ ··· 37 37 quiet_cmd_yamllint = LINT $(src) 38 38 cmd_yamllint = ($(find_cmd) | \ 39 39 xargs -n200 -P$$(nproc) \ 40 - $(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint >&2) \ 40 + $(DT_SCHEMA_LINT) -f parsable -c $(src)/.yamllint >&2) \ 41 41 && touch $@ || true 42 42 43 43 quiet_cmd_chk_bindings = CHKDT $(src) 44 44 cmd_chk_bindings = ($(find_cmd) | \ 45 - xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(srctree)/$(src)) \ 45 + xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(src)) \ 46 46 && touch $@ || true 47 47 48 48 quiet_cmd_mk_schema = SCHEMA $@
+6 -6
Documentation/kbuild/makefiles.rst
··· 346 346 Example:: 347 347 348 348 #arch/cris/boot/compressed/Makefile 349 - ldflags-y += -T $(srctree)/$(src)/decompress_$(arch-y).lds 349 + ldflags-y += -T $(src)/decompress_$(arch-y).lds 350 350 351 351 subdir-ccflags-y, subdir-asflags-y 352 352 The two flags listed above are similar to ccflags-y and asflags-y. ··· 426 426 Two variables are used when defining custom rules: 427 427 428 428 $(src) 429 - $(src) is a relative path which points to the directory 430 - where the Makefile is located. Always use $(src) when 429 + $(src) is the directory where the Makefile is located. Always use $(src) when 431 430 referring to files located in the src tree. 432 431 433 432 $(obj) 434 - $(obj) is a relative path which points to the directory 435 - where the target is saved. Always use $(obj) when 436 - referring to generated files. 433 + $(obj) is the directory where the target is saved. Always use $(obj) when 434 + referring to generated files. Use $(obj) for pattern rules that need to work 435 + for both generated files and real sources (VPATH will help to find the 436 + prerequisites not only in the object tree but also in the source tree). 437 437 438 438 Example:: 439 439
+7
Makefile
··· 263 263 endif 264 264 265 265 objtree := . 266 + 267 + VPATH := 268 + 269 + ifeq ($(KBUILD_EXTMOD),) 270 + ifdef building_out_of_srctree 266 271 VPATH := $(srctree) 272 + endif 273 + endif 267 274 268 275 export building_out_of_srctree srctree objtree VPATH 269 276
+1 -2
arch/arc/boot/dts/Makefile
··· 10 10 dtb-y := $(builtindtb-y).dtb 11 11 12 12 # for CONFIG_OF_ALL_DTBS test 13 - dtstree := $(srctree)/$(src) 14 - dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 13 + dtb- := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts)) 15 14 16 15 # board-specific dtc flags 17 16 DTC_FLAGS_hsdk += --pad 20
+1 -1
arch/arm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 obj-$(CONFIG_FPE_NWFPE) += nwfpe/ 3 3 # Put arch/arm/fastfpe/ to use this. 4 - obj-$(CONFIG_FPE_FASTFPE) += $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/fastfpe/)) 4 + obj-$(CONFIG_FPE_FASTFPE) += $(patsubst $(src)/%,%,$(wildcard $(src)/fastfpe/)) 5 5 obj-$(CONFIG_VFP) += vfp/ 6 6 obj-$(CONFIG_XEN) += xen/ 7 7 obj-$(CONFIG_VDSO) += vdso/
+1 -2
arch/arm/boot/Makefile
··· 25 25 26 26 ifeq ($(CONFIG_XIP_KERNEL),y) 27 27 28 - cmd_deflate_xip_data = $(CONFIG_SHELL) -c \ 29 - '$(srctree)/$(src)/deflate_xip_data.sh $< $@' 28 + cmd_deflate_xip_data = $(CONFIG_SHELL) -c '$(src)/deflate_xip_data.sh $< $@' 30 29 31 30 ifeq ($(CONFIG_XIP_DEFLATED_DATA),y) 32 31 quiet_cmd_mkxip = XIPZ $@
+1 -1
arch/arm/mach-s3c/Makefile
··· 2 2 # 3 3 # Copyright 2009 Simtec Electronics 4 4 5 - include $(srctree)/$(src)/Makefile.s3c64xx 5 + include $(src)/Makefile.s3c64xx 6 6 7 7 # Objects we always build independent of SoC choice 8 8
+1 -1
arch/arm/plat-orion/Makefile
··· 2 2 # 3 3 # Makefile for the linux kernel. 4 4 # 5 - ccflags-y := -I$(srctree)/$(src)/include 5 + ccflags-y := -I$(src)/include 6 6 7 7 orion-gpio-$(CONFIG_GPIOLIB) += gpio.o 8 8 obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
+1 -1
arch/arm/tools/Makefile
··· 9 9 kapi := $(gen)/asm 10 10 uapi := $(gen)/uapi/asm 11 11 syshdr := $(srctree)/scripts/syscallhdr.sh 12 - sysnr := $(srctree)/$(src)/syscallnr.sh 12 + sysnr := $(src)/syscallnr.sh 13 13 systbl := $(srctree)/scripts/syscalltbl.sh 14 14 syscall := $(src)/syscall.tbl 15 15
+1 -1
arch/arm64/kernel/vdso/Makefile
··· 68 68 $(call if_changed,objcopy) 69 69 70 70 # Generate VDSO offsets using helper script 71 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 71 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 72 72 quiet_cmd_vdsosym = VDSOSYM $@ 73 73 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 74 74
+2 -2
arch/arm64/kvm/Makefile
··· 3 3 # Makefile for Kernel-based Virtual Machine module 4 4 # 5 5 6 - ccflags-y += -I $(srctree)/$(src) 6 + ccflags-y += -I $(src) 7 7 8 8 include $(srctree)/virt/kvm/Makefile.kvm 9 9 ··· 30 30 $(call filechk,offsets,__HYP_CONSTANTS_H__) 31 31 endef 32 32 33 - CFLAGS_hyp-constants.o = -I $(srctree)/$(src)/hyp/include 33 + CFLAGS_hyp-constants.o = -I $(src)/hyp/include 34 34 $(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE 35 35 $(call if_changed_dep,cc_s_c) 36 36
+1 -1
arch/arm64/kvm/hyp/Makefile
··· 3 3 # Makefile for Kernel-based Virtual Machine module, HYP part 4 4 # 5 5 6 - incdir := $(srctree)/$(src)/include 6 + incdir := $(src)/include 7 7 subdir-asflags-y := -I$(incdir) 8 8 subdir-ccflags-y := -I$(incdir) 9 9
+1 -3
arch/csky/boot/dts/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - dtstree := $(srctree)/$(src) 3 - 4 - dtb-y := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 2 + dtb-y := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+1 -1
arch/csky/kernel/vdso/Makefile
··· 57 57 # Extracts symbol offsets from the VDSO, converting them into an assembly file 58 58 # that contains the same symbols at the same offsets. 59 59 quiet_cmd_so2s = SO2S $@ 60 - cmd_so2s = $(NM) -D $< | $(srctree)/$(src)/so2s.sh > $@ 60 + cmd_so2s = $(NM) -D $< | $(src)/so2s.sh > $@
+1 -1
arch/loongarch/kvm/Makefile
··· 3 3 # Makefile for LoongArch KVM support 4 4 # 5 5 6 - ccflags-y += -I $(srctree)/$(src) 6 + ccflags-y += -I $(src) 7 7 8 8 include $(srctree)/virt/kvm/Makefile.kvm 9 9
+1 -1
arch/loongarch/vdso/Makefile
··· 52 52 cmd_vdsoas_o_S = $(CC) $(a_flags) -c -o $@ $< 53 53 54 54 # Generate VDSO offsets using helper script 55 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 55 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 56 56 quiet_cmd_vdsosym = VDSOSYM $@ 57 57 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 58 58
+1 -1
arch/mips/kernel/syscalls/Makefile
··· 5 5 $(shell mkdir -p $(uapi) $(kapi)) 6 6 7 7 syshdr := $(srctree)/scripts/syscallhdr.sh 8 - sysnr := $(srctree)/$(src)/syscallnr.sh 8 + sysnr := $(src)/syscallnr.sh 9 9 systbl := $(srctree)/scripts/syscalltbl.sh 10 10 11 11 quiet_cmd_syshdr = SYSHDR $@
+2 -2
arch/mips/vdso/Makefile
··· 43 43 # config-n32-o32-env.c prepares the environment to build a 32bit vDSO 44 44 # library on a 64bit kernel. 45 45 # Note: Needs to be included before than the generic library. 46 - CFLAGS_vgettimeofday-o32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 47 - CFLAGS_vgettimeofday-n32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 46 + CFLAGS_vgettimeofday-o32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 47 + CFLAGS_vgettimeofday-n32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 48 48 endif 49 49 50 50 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
+1 -2
arch/nios2/boot/dts/Makefile
··· 2 2 3 3 obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE)) 4 4 5 - dtstree := $(srctree)/$(src) 6 - dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 5 + dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+1 -1
arch/parisc/kernel/vdso32/Makefile
··· 40 40 cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< 41 41 42 42 # Generate VDSO offsets using helper script 43 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 43 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 44 44 quiet_cmd_vdsosym = VDSOSYM $@ 45 45 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 46 46
+1 -1
arch/parisc/kernel/vdso64/Makefile
··· 40 40 cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< 41 41 42 42 # Generate VDSO offsets using helper script 43 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 43 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 44 44 quiet_cmd_vdsosym = VDSOSYM $@ 45 45 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 46 46
+3 -3
arch/powerpc/boot/Makefile
··· 218 218 $(obj)/empty.c: 219 219 $(Q)touch $@ 220 220 221 - $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S 221 + $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(src)/%.S 222 222 $(Q)cp $< $@ 223 223 224 224 clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \ ··· 252 252 extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 253 253 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds 254 254 255 - dtstree := $(srctree)/$(src)/dts 255 + dtstree := $(src)/dts 256 256 257 - wrapper :=$(srctree)/$(src)/wrapper 257 + wrapper := $(src)/wrapper 258 258 wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ 259 259 $(wrapper) FORCE 260 260
+1 -2
arch/powerpc/boot/dts/Makefile
··· 2 2 3 3 subdir-y += fsl 4 4 5 - dtstree := $(srctree)/$(src) 6 - dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 5 + dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+1 -2
arch/powerpc/boot/dts/fsl/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - dtstree := $(srctree)/$(src) 4 - dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 3 + dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+2 -2
arch/powerpc/kernel/vdso/Makefile
··· 90 90 $(call if_changed_dep,cc_o_c) 91 91 92 92 # Generate VDSO offsets using helper script 93 - gen-vdso32sym := $(srctree)/$(src)/gen_vdso32_offsets.sh 93 + gen-vdso32sym := $(src)/gen_vdso32_offsets.sh 94 94 quiet_cmd_vdso32sym = VDSO32SYM $@ 95 95 cmd_vdso32sym = $(NM) $< | $(gen-vdso32sym) | LC_ALL=C sort > $@ 96 - gen-vdso64sym := $(srctree)/$(src)/gen_vdso64_offsets.sh 96 + gen-vdso64sym := $(src)/gen_vdso64_offsets.sh 97 97 quiet_cmd_vdso64sym = VDSO64SYM $@ 98 98 cmd_vdso64sym = $(NM) $< | $(gen-vdso64sym) | LC_ALL=C sort > $@ 99 99
+1 -1
arch/riscv/kernel/compat_vdso/Makefile
··· 58 58 $(call if_changed,objcopy) 59 59 60 60 # Generate VDSO offsets using helper script 61 - gen-compat_vdsosym := $(srctree)/$(src)/gen_compat_vdso_offsets.sh 61 + gen-compat_vdsosym := $(src)/gen_compat_vdso_offsets.sh 62 62 quiet_cmd_compat_vdsosym = VDSOSYM $@ 63 63 cmd_compat_vdsosym = $(NM) $< | $(gen-compat_vdsosym) | LC_ALL=C sort > $@ 64 64
+1 -1
arch/riscv/kernel/vdso/Makefile
··· 60 60 $(call if_changed,objcopy) 61 61 62 62 # Generate VDSO offsets using helper script 63 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 63 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 64 64 quiet_cmd_vdsosym = VDSOSYM $@ 65 65 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 66 66
+1 -1
arch/riscv/kvm/Makefile
··· 3 3 # Makefile for RISC-V KVM support 4 4 # 5 5 6 - ccflags-y += -I $(srctree)/$(src) 6 + ccflags-y += -I $(src) 7 7 8 8 include $(srctree)/virt/kvm/Makefile.kvm 9 9
+2 -2
arch/s390/kernel/syscalls/Makefile
··· 4 4 kapi := $(gen)/asm 5 5 uapi := $(gen)/uapi/asm 6 6 7 - syscall := $(srctree)/$(src)/syscall.tbl 8 - systbl := $(srctree)/$(src)/syscalltbl 7 + syscall := $(src)/syscall.tbl 8 + systbl := $(src)/syscalltbl 9 9 10 10 gen-y := $(kapi)/syscall_table.h 11 11 kapi-hdrs-y := $(kapi)/unistd_nr.h
+1 -1
arch/s390/kernel/vdso32/Makefile
··· 62 62 cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $< 63 63 64 64 # Generate VDSO offsets using helper script 65 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 65 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 66 66 quiet_cmd_vdsosym = VDSOSYM $@ 67 67 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 68 68
+1 -1
arch/s390/kernel/vdso64/Makefile
··· 72 72 cmd_vdso64cc = $(CC) $(c_flags) -c -o $@ $< 73 73 74 74 # Generate VDSO offsets using helper script 75 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 75 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 76 76 quiet_cmd_vdsosym = VDSOSYM $@ 77 77 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 78 78
+1 -1
arch/sparc/vdso/Makefile
··· 103 103 cmd_vdso = $(LD) -nostdlib -o $@ \ 104 104 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 105 105 -T $(filter %.lds,$^) $(filter %.o,$^) && \ 106 - sh $(srctree)/$(src)/checkundef.sh '$(OBJDUMP)' '$@' 106 + sh $(src)/checkundef.sh '$(OBJDUMP)' '$@' 107 107 108 108 VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic 109 109 GCOV_PROFILE := n
+1 -1
arch/um/kernel/Makefile
··· 47 47 $(call if_changed,quote2) 48 48 49 49 quiet_cmd_mkcapflags = MKCAP $@ 50 - cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/../../x86/kernel/cpu/mkcapflags.sh $@ $^ 50 + cmd_mkcapflags = $(CONFIG_SHELL) $(src)/../../x86/kernel/cpu/mkcapflags.sh $@ $^ 51 51 52 52 cpufeature = $(src)/../../x86/include/asm/cpufeatures.h 53 53 vmxfeature = $(src)/../../x86/include/asm/vmxfeatures.h
+1 -1
arch/x86/boot/Makefile
··· 129 129 # genimage.sh requires bash, but it also has a bunch of other 130 130 # external dependencies. 131 131 quiet_cmd_genimage = GENIMAGE $3 132 - cmd_genimage = $(BASH) $(srctree)/$(src)/genimage.sh $2 $3 $(obj)/bzImage \ 132 + cmd_genimage = $(BASH) $(src)/genimage.sh $2 $3 $(obj)/bzImage \ 133 133 $(obj)/mtools.conf '$(FDARGS)' $(FDINITRD) 134 134 135 135 PHONY += bzdisk fdimage fdimage144 fdimage288 hdimage isoimage
+1 -1
arch/x86/entry/vdso/Makefile
··· 176 176 cmd_vdso = $(LD) -o $@ \ 177 177 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 178 178 -T $(filter %.lds,$^) $(filter %.o,$^) && \ 179 - sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' 179 + sh $(src)/checkundef.sh '$(NM)' '$@' 180 180 181 181 VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 \ 182 182 $(call ld-option, --eh-frame-hdr) -Bsymbolic -z noexecstack
+1 -1
arch/x86/kernel/Makefile
··· 40 40 KCOV_INSTRUMENT_head$(BITS).o := n 41 41 KCOV_INSTRUMENT_sev.o := n 42 42 43 - CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace 43 + CFLAGS_irq.o := -I $(src)/../include/asm/trace 44 44 45 45 obj-y += head_$(BITS).o 46 46 obj-y += head$(BITS).o
+1 -1
arch/x86/kernel/cpu/Makefile
··· 60 60 obj-$(CONFIG_DEBUG_FS) += debugfs.o 61 61 62 62 quiet_cmd_mkcapflags = MKCAP $@ 63 - cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $@ $^ 63 + cmd_mkcapflags = $(CONFIG_SHELL) $(src)/mkcapflags.sh $@ $^ 64 64 65 65 cpufeature = $(src)/../../include/asm/cpufeatures.h 66 66 vmxfeature = $(src)/../../include/asm/vmxfeatures.h
+1 -1
arch/x86/mm/Makefile
··· 34 34 CFLAGS_physaddr.o := -fno-stack-protector 35 35 CFLAGS_mem_encrypt_identity.o := -fno-stack-protector 36 36 37 - CFLAGS_fault.o := -I $(srctree)/$(src)/../include/asm/trace 37 + CFLAGS_fault.o := -I $(src)/../include/asm/trace 38 38 39 39 obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o 40 40
+1 -1
arch/x86/um/vdso/Makefile
··· 63 63 cmd_vdso = $(CC) -nostdlib -o $@ \ 64 64 $(CC_FLAGS_LTO) $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 65 65 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ 66 - sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' 66 + sh $(src)/checkundef.sh '$(NM)' '$@' 67 67 68 68 VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack 69 69 GCOV_PROFILE := n
+1 -2
arch/xtensa/boot/dts/Makefile
··· 10 10 obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE)) 11 11 12 12 # for CONFIG_OF_ALL_DTBS test 13 - dtstree := $(srctree)/$(src) 14 - dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 13 + dtb- := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+2 -2
certs/Makefile
··· 13 13 quiet_cmd_check_and_copy_blacklist_hash_list = GEN $@ 14 14 cmd_check_and_copy_blacklist_hash_list = \ 15 15 $(if $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST), \ 16 - $(AWK) -f $(srctree)/$(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \ 16 + $(AWK) -f $(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \ 17 17 { cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST); echo $(comma) NULL; } > $@, \ 18 18 echo NULL > $@) 19 19 ··· 55 55 targets += signing_key.pem 56 56 57 57 quiet_cmd_copy_x509_config = COPY $@ 58 - cmd_copy_x509_config = cat $(srctree)/$(src)/default_x509.genkey > $@ 58 + cmd_copy_x509_config = cat $(src)/default_x509.genkey > $@ 59 59 60 60 # You can provide your own config file. If not present, copy the default one. 61 61 $(obj)/x509.genkey:
-5
drivers/Makefile
··· 6 6 # Rewritten to use lists instead of if-statements. 7 7 # 8 8 9 - # Some driver Makefiles miss $(srctree)/ for include directive. 10 - ifdef building_out_of_srctree 11 - MAKEFLAGS += --include-dir=$(srctree) 12 - endif 13 - 14 9 obj-y += cache/ 15 10 obj-y += irqchip/ 16 11 obj-y += bus/
+1 -1
drivers/crypto/intel/qat/qat_420xx/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_420XX) += qat_420xx.o 4 4 qat_420xx-objs := adf_drv.o adf_420xx_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_4xxx/Makefile
··· 1 1 # SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_4XXX) += qat_4xxx.o 4 4 qat_4xxx-objs := adf_drv.o adf_4xxx_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c3xxx/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXX) += qat_c3xxx.o 4 4 qat_c3xxx-objs := adf_drv.o adf_c3xxx_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c3xxxvf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXXVF) += qat_c3xxxvf.o 4 4 qat_c3xxxvf-objs := adf_drv.o adf_c3xxxvf_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c62x/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C62X) += qat_c62x.o 4 4 qat_c62x-objs := adf_drv.o adf_c62x_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c62xvf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C62XVF) += qat_c62xvf.o 4 4 qat_c62xvf-objs := adf_drv.o adf_c62xvf_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_dh895xcc/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCC) += qat_dh895xcc.o 4 4 qat_dh895xcc-objs := adf_drv.o adf_dh895xcc_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_dh895xccvf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCCVF) += qat_dh895xccvf.o 4 4 qat_dh895xccvf-objs := adf_drv.o adf_dh895xccvf_hw_data.o
+1 -1
drivers/gpu/drm/amd/amdgpu/Makefile
··· 23 23 # Makefile for the drm device driver. This driver provides support for the 24 24 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. 25 25 26 - FULL_AMD_PATH=$(srctree)/$(src)/.. 26 + FULL_AMD_PATH=$(src)/.. 27 27 DISPLAY_FOLDER_NAME=display 28 28 FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME) 29 29
+2 -2
drivers/gpu/drm/arm/display/komeda/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 3 ccflags-y := \ 4 - -I $(srctree)/$(src)/../include \ 5 - -I $(srctree)/$(src) 4 + -I $(src)/../include \ 5 + -I $(src) 6 6 7 7 komeda-y := \ 8 8 komeda_drv.o \
+2 -2
drivers/gpu/drm/i915/Makefile
··· 41 41 # drivers. Define I915 when building i915. 42 42 subdir-ccflags-y += -DI915 43 43 44 - subdir-ccflags-y += -I$(srctree)/$(src) 44 + subdir-ccflags-y += -I$(src) 45 45 46 46 # Please keep these build lists sorted! 47 47 ··· 434 434 435 435 always-$(CONFIG_DRM_I915_WERROR) += \ 436 436 $(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \ 437 - $(shell cd $(srctree)/$(src) && find * -name '*.h'))) 437 + $(shell cd $(src) && find * -name '*.h'))) 438 438 439 439 quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) 440 440 cmd_hdrtest = $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; \
+1 -1
drivers/gpu/drm/imagination/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only OR MIT 2 2 # Copyright (c) 2023 Imagination Technologies Ltd. 3 3 4 - subdir-ccflags-y := -I$(srctree)/$(src) 4 + subdir-ccflags-y := -I$(src) 5 5 6 6 powervr-y := \ 7 7 pvr_ccb.o \
+4 -4
drivers/gpu/drm/msm/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ccflags-y := -I $(srctree)/$(src) 3 - ccflags-y += -I $(srctree)/$(src)/disp/dpu1 4 - ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi 5 - ccflags-$(CONFIG_DRM_MSM_DP) += -I $(srctree)/$(src)/dp 2 + ccflags-y := -I $(src) 3 + ccflags-y += -I $(src)/disp/dpu1 4 + ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(src)/dsi 5 + ccflags-$(CONFIG_DRM_MSM_DP) += -I $(src)/dp 6 6 7 7 msm-y := \ 8 8 adreno/adreno_device.o \
+4 -6
drivers/gpu/drm/nouveau/Kbuild
··· 1 - NOUVEAU_PATH ?= $(srctree) 2 - 3 1 # SPDX-License-Identifier: MIT 4 - ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include 5 - ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include/nvkm 6 - ccflags-y += -I $(NOUVEAU_PATH)/$(src)/nvkm 7 - ccflags-y += -I $(NOUVEAU_PATH)/$(src) 2 + ccflags-y += -I $(src)/include 3 + ccflags-y += -I $(src)/include/nvkm 4 + ccflags-y += -I $(src)/nvkm 5 + ccflags-y += -I $(src) 8 6 9 7 # NVKM - HW resource manager 10 8 #- code also used by various userspace tools/tests
+5 -5
drivers/gpu/drm/xe/Makefile
··· 32 32 # Enable -Werror in CI and development 33 33 subdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror 34 34 35 - subdir-ccflags-y += -I$(obj) -I$(srctree)/$(src) 35 + subdir-ccflags-y += -I$(obj) -I$(src) 36 36 37 37 # generated sources 38 38 hostprogs := xe_gen_wa_oob ··· 43 43 cmd_wa_oob = mkdir -p $(@D); $^ $(generated_oob) 44 44 45 45 $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \ 46 - $(srctree)/$(src)/xe_wa_oob.rules 46 + $(src)/xe_wa_oob.rules 47 47 $(call cmd,wa_oob) 48 48 49 49 uses_generated_oob := \ ··· 166 166 167 167 # i915 Display compat #defines and #includes 168 168 subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ 169 - -I$(srctree)/$(src)/display/ext \ 170 - -I$(srctree)/$(src)/compat-i915-headers \ 169 + -I$(src)/display/ext \ 170 + -I$(src)/compat-i915-headers \ 171 171 -I$(srctree)/drivers/gpu/drm/i915/display/ \ 172 172 -Ddrm_i915_gem_object=xe_bo \ 173 173 -Ddrm_i915_private=xe_device ··· 310 310 endif 311 311 312 312 always-$(CONFIG_DRM_XE_WERROR) += \ 313 - $(patsubst %.h,%.hdrtest, $(shell cd $(srctree)/$(src) && find * -name '*.h' $(hdrtest_find_args))) 313 + $(patsubst %.h,%.hdrtest, $(shell cd $(src) && find * -name '*.h' $(hdrtest_find_args))) 314 314 315 315 quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) 316 316 cmd_hdrtest = $(CC) -DHDRTEST $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; touch $@
+1 -1
drivers/hid/amd-sfh-hid/Makefile
··· 13 13 amd_sfh-objs += sfh1_1/amd_sfh_interface.o 14 14 amd_sfh-objs += sfh1_1/amd_sfh_desc.o 15 15 16 - ccflags-y += -I $(srctree)/$(src)/ 16 + ccflags-y += -I $(src)/
+1 -1
drivers/hid/intel-ish-hid/Makefile
··· 23 23 obj-$(CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ishtp-loader.o 24 24 intel-ishtp-loader-objs += ishtp-fw-loader.o 25 25 26 - ccflags-y += -I $(srctree)/$(src)/ishtp 26 + ccflags-y += -I $(src)/ishtp
+1 -1
drivers/md/dm-vdo/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - ccflags-y := -I$(srctree)/$(src) -I$(srctree)/$(src)/indexer 3 + ccflags-y := -I$(src) -I$(src)/indexer 4 4 5 5 obj-$(CONFIG_DM_VDO) += dm-vdo.o 6 6
+1 -1
drivers/net/ethernet/aquantia/atlantic/Makefile
··· 8 8 9 9 obj-$(CONFIG_AQTION) += atlantic.o 10 10 11 - ccflags-y += -I$(srctree)/$(src) 11 + ccflags-y += -I$(src) 12 12 13 13 atlantic-objs := aq_main.o \ 14 14 aq_nic.o \
+1 -1
drivers/net/ethernet/chelsio/libcxgb/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../cxgb4 2 + ccflags-y := -I $(src)/../cxgb4 3 3 4 4 obj-$(CONFIG_CHELSIO_LIB) += libcxgb.o 5 5
+1 -1
drivers/net/ethernet/fungible/funeth/Makefile
··· 1 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 2 3 - ccflags-y += -I$(srctree)/$(src)/../funcore -I$(srctree)/$(src) 3 + ccflags-y += -I$(src)/../funcore -I$(src) 4 4 5 5 obj-$(CONFIG_FUN_ETH) += funeth.o 6 6
+1 -1
drivers/net/ethernet/hisilicon/hns3/Makefile
··· 3 3 # Makefile for the HISILICON network device drivers. 4 4 # 5 5 6 - ccflags-y += -I$(srctree)/$(src) 6 + ccflags-y += -I$(src) 7 7 ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3pf 8 8 ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3vf 9 9 ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3_common
+2 -2
drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
··· 6 6 # 7 7 8 8 ccflags-y += \ 9 - -I $(srctree)/$(src) \ 10 - -I $(srctree)/$(src)/../include 9 + -I $(src) \ 10 + -I $(src)/../include 11 11 12 12 obj-$(CONFIG_BRCMFMAC) += brcmfmac.o 13 13 brcmfmac-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/Makefile
··· 3 3 # Copyright (c) 2022 Broadcom Corporation 4 4 5 5 ccflags-y += \ 6 - -I $(srctree)/$(src) \ 7 - -I $(srctree)/$(src)/.. \ 8 - -I $(srctree)/$(src)/../../include 6 + -I $(src) \ 7 + -I $(src)/.. \ 8 + -I $(src)/../../include 9 9 10 10 obj-m += brcmfmac-bca.o 11 11 brcmfmac-bca-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/Makefile
··· 3 3 # Copyright (c) 2022 Broadcom Corporation 4 4 5 5 ccflags-y += \ 6 - -I $(srctree)/$(src) \ 7 - -I $(srctree)/$(src)/.. \ 8 - -I $(srctree)/$(src)/../../include 6 + -I $(src) \ 7 + -I $(src)/.. \ 8 + -I $(src)/../../include 9 9 10 10 obj-m += brcmfmac-cyw.o 11 11 brcmfmac-cyw-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/Makefile
··· 3 3 # Copyright (c) 2022 Broadcom Corporation 4 4 5 5 ccflags-y += \ 6 - -I $(srctree)/$(src) \ 7 - -I $(srctree)/$(src)/.. \ 8 - -I $(srctree)/$(src)/../../include 6 + -I $(src) \ 7 + -I $(src)/.. \ 8 + -I $(src)/../../include 9 9 10 10 obj-m += brcmfmac-wcc.o 11 11 brcmfmac-wcc-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
··· 16 16 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 17 18 18 ccflags-y := \ 19 - -I $(srctree)/$(src) \ 20 - -I $(srctree)/$(src)/phy \ 21 - -I $(srctree)/$(src)/../include 19 + -I $(src) \ 20 + -I $(src)/phy \ 21 + -I $(src)/../include 22 22 23 23 brcmsmac-y := \ 24 24 mac80211_if.o \
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile
··· 4 4 # 5 5 # Copyright (c) 2011 Broadcom Corporation 6 6 # 7 - ccflags-y := -I $(srctree)/$(src)/../include 7 + ccflags-y := -I $(src)/../include 8 8 9 9 obj-$(CONFIG_BRCMUTIL) += brcmutil.o 10 10 brcmutil-objs = utils.o d11.o
+1 -1
drivers/net/wireless/intel/iwlwifi/dvm/Makefile
··· 11 11 iwldvm-$(CONFIG_IWLWIFI_LEDS) += led.o 12 12 iwldvm-$(CONFIG_IWLWIFI_DEBUGFS) += debugfs.o 13 13 14 - ccflags-y += -I $(srctree)/$(src)/../ 14 + ccflags-y += -I $(src)/../
+1 -1
drivers/net/wireless/intel/iwlwifi/mei/Makefile
··· 5 5 iwlmei-$(CONFIG_IWLWIFI_DEVICE_TRACING) += trace.o 6 6 CFLAGS_trace.o := -I$(src) 7 7 8 - ccflags-y += -I $(srctree)/$(src)/../ 8 + ccflags-y += -I $(src)/../
+1 -1
drivers/net/wireless/intel/iwlwifi/mvm/Makefile
··· 15 15 iwlmvm-$(CONFIG_PM) += d3.o 16 16 iwlmvm-$(CONFIG_IWLMEI) += vendor-cmd.o 17 17 18 - ccflags-y += -I $(srctree)/$(src)/../ 18 + ccflags-y += -I $(src)/../
+1 -1
drivers/net/wireless/intel/iwlwifi/tests/Makefile
··· 2 2 3 3 iwlwifi-tests-y += module.o devinfo.o 4 4 5 - ccflags-y += -I$(srctree)/$(src)/../ 5 + ccflags-y += -I$(src)/../ 6 6 7 7 obj-$(CONFIG_IWLWIFI_KUNIT_TESTS) += iwlwifi-tests.o
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile
··· 3 3 4 4 obj-$(CONFIG_RTL8180) += rtl818x_pci.o 5 5 6 - ccflags-y += -I $(srctree)/$(src)/.. 6 + ccflags-y += -I $(src)/..
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile
··· 3 3 4 4 obj-$(CONFIG_RTL8187) += rtl8187.o 5 5 6 - ccflags-y += -I $(srctree)/$(src)/.. 6 + ccflags-y += -I $(src)/..
+6 -6
drivers/scsi/aic7xxx/Makefile
··· 55 55 56 56 ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) 57 57 $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm 58 - $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \ 58 + $(obj)/aicasm/aicasm -I $(src) -r $(obj)/aic7xxx_reg.h \ 59 59 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ 60 - $(srctree)/$(src)/aic7xxx.seq 60 + $(src)/aic7xxx.seq 61 61 62 62 $(aic7xxx-gen-y): $(objtree)/$(obj)/aic7xxx_seq.h 63 63 @true ··· 73 73 74 74 ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) 75 75 $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm 76 - $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \ 76 + $(obj)/aicasm/aicasm -I $(src) -r $(obj)/aic79xx_reg.h \ 77 77 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ 78 - $(srctree)/$(src)/aic79xx.seq 78 + $(src)/aic79xx.seq 79 79 80 80 $(aic79xx-gen-y): $(objtree)/$(obj)/aic79xx_seq.h 81 81 @true ··· 83 83 $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped 84 84 endif 85 85 86 - $(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl] 87 - $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/ 86 + $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] 87 + $(MAKE) -C $(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/
+1 -1
drivers/staging/rtl8723bs/Makefile
··· 62 62 63 63 obj-$(CONFIG_RTL8723BS) := r8723bs.o 64 64 65 - ccflags-y += -I$(srctree)/$(src)/include -I$(srctree)/$(src)/hal 65 + ccflags-y += -I$(src)/include -I$(src)/hal
+1 -1
fs/iomap/Makefile
··· 4 4 # All Rights Reserved. 5 5 # 6 6 7 - ccflags-y += -I $(srctree)/$(src) # needed for trace events 7 + ccflags-y += -I $(src) # needed for trace events 8 8 9 9 obj-$(CONFIG_FS_IOMAP) += iomap.o 10 10
+7 -7
fs/unicode/Makefile
··· 18 18 19 19 quiet_cmd_utf8data = GEN $@ 20 20 cmd_utf8data = $< \ 21 - -a $(srctree)/$(src)/DerivedAge.txt \ 22 - -c $(srctree)/$(src)/DerivedCombiningClass.txt \ 23 - -p $(srctree)/$(src)/DerivedCoreProperties.txt \ 24 - -d $(srctree)/$(src)/UnicodeData.txt \ 25 - -f $(srctree)/$(src)/CaseFolding.txt \ 26 - -n $(srctree)/$(src)/NormalizationCorrections.txt \ 27 - -t $(srctree)/$(src)/NormalizationTest.txt \ 21 + -a $(src)/DerivedAge.txt \ 22 + -c $(src)/DerivedCombiningClass.txt \ 23 + -p $(src)/DerivedCoreProperties.txt \ 24 + -d $(src)/UnicodeData.txt \ 25 + -f $(src)/CaseFolding.txt \ 26 + -n $(src)/NormalizationCorrections.txt \ 27 + -t $(src)/NormalizationTest.txt \ 28 28 -o $@ 29 29 30 30 $(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
+2 -2
fs/xfs/Makefile
··· 4 4 # All Rights Reserved. 5 5 # 6 6 7 - ccflags-y += -I $(srctree)/$(src) # needed for trace events 8 - ccflags-y += -I $(srctree)/$(src)/libxfs 7 + ccflags-y += -I $(src) # needed for trace events 8 + ccflags-y += -I $(src)/libxfs 9 9 10 10 obj-$(CONFIG_XFS_FS) += xfs.o 11 11
+1 -1
init/Makefile
··· 52 52 # Build version-timestamp.c with final UTS_VERSION 53 53 # 54 54 55 - include/generated/utsversion.h: build-version-auto = $(shell $(srctree)/$(src)/build-version) 55 + include/generated/utsversion.h: build-version-auto = $(shell $(src)/build-version) 56 56 include/generated/utsversion.h: build-timestamp-auto = $(shell LC_ALL=C date) 57 57 include/generated/utsversion.h: FORCE 58 58 $(call filechk,uts_version)
+3 -3
lib/Makefile
··· 352 352 $(call cmd,build_OID_registry) 353 353 354 354 quiet_cmd_build_OID_registry = GEN $@ 355 - cmd_build_OID_registry = perl $(srctree)/$(src)/build_OID_registry $< $@ 355 + cmd_build_OID_registry = perl $(src)/build_OID_registry $< $@ 356 356 357 357 clean-files += oid_registry_data.c 358 358 ··· 412 412 obj-$(CONFIG_FIRMWARE_TABLE) += fw_table.o 413 413 414 414 # FORTIFY_SOURCE compile-time behavior tests 415 - TEST_FORTIFY_SRCS = $(wildcard $(srctree)/$(src)/test_fortify/*-*.c) 416 - TEST_FORTIFY_LOGS = $(patsubst $(srctree)/$(src)/%.c, %.log, $(TEST_FORTIFY_SRCS)) 415 + TEST_FORTIFY_SRCS = $(wildcard $(src)/test_fortify/*-*.c) 416 + TEST_FORTIFY_LOGS = $(patsubst $(src)/%.c, %.log, $(TEST_FORTIFY_SRCS)) 417 417 TEST_FORTIFY_LOG = test_fortify.log 418 418 419 419 quiet_cmd_test_fortify = TEST $@
+1 -1
lib/raid6/Makefile
··· 53 53 endif 54 54 55 55 quiet_cmd_unroll = UNROLL $@ 56 - cmd_unroll = $(AWK) -v N=$* -f $(srctree)/$(src)/unroll.awk < $< > $@ 56 + cmd_unroll = $(AWK) -v N=$* -f $(src)/unroll.awk < $< > $@ 57 57 58 58 targets += int1.c int2.c int4.c int8.c 59 59 $(obj)/int%.c: $(src)/int.uc $(src)/unroll.awk FORCE
+1 -1
net/wireless/Makefile
··· 25 25 cfg80211-y += extra-certs.o 26 26 endif 27 27 28 - $(obj)/shipped-certs.c: $(sort $(wildcard $(srctree)/$(src)/certs/*.hex)) 28 + $(obj)/shipped-certs.c: $(sort $(wildcard $(src)/certs/*.hex)) 29 29 @$(kecho) " GEN $@" 30 30 $(Q)(echo '#include "reg.h"'; \ 31 31 echo 'const u8 shipped_regdb_certs[] = {'; \
+3 -3
rust/Makefile
··· 239 239 rm -rf $(objtree)/$(obj)/test; \ 240 240 mkdir -p $(objtree)/$(obj)/test; \ 241 241 cp -a $(rustc_sysroot) $(objtree)/$(obj)/test/sysroot; \ 242 - cp -r $(srctree)/$(src)/alloc/* \ 242 + cp -r $(src)/alloc/* \ 243 243 $(objtree)/$(obj)/test/sysroot/lib/rustlib/src/rust/library/alloc/src; \ 244 244 echo '\#!/bin/sh' > $(objtree)/$(obj)/test/rustc_sysroot; \ 245 245 echo "$(RUSTC) --sysroot=$(abspath $(objtree)/$(obj)/test/sysroot) \"\$$@\"" \ ··· 340 340 $(bindgen_target_cflags) $(bindgen_target_extra) 341 341 342 342 $(obj)/bindings/bindings_generated.rs: private bindgen_target_flags = \ 343 - $(shell grep -Ev '^#|^$$' $(srctree)/$(src)/bindgen_parameters) 343 + $(shell grep -Ev '^#|^$$' $(src)/bindgen_parameters) 344 344 $(obj)/bindings/bindings_generated.rs: private bindgen_target_extra = ; \ 345 345 sed -Ei 's/pub const RUST_CONST_HELPER_([a-zA-Z0-9_]*)/pub const \1/g' $@ 346 346 $(obj)/bindings/bindings_generated.rs: $(src)/bindings/bindings_helper.h \ ··· 348 348 $(call if_changed_dep,bindgen) 349 349 350 350 $(obj)/uapi/uapi_generated.rs: private bindgen_target_flags = \ 351 - $(shell grep -Ev '^#|^$$' $(srctree)/$(src)/bindgen_parameters) 351 + $(shell grep -Ev '^#|^$$' $(src)/bindgen_parameters) 352 352 $(obj)/uapi/uapi_generated.rs: $(src)/uapi/uapi_helper.h \ 353 353 $(src)/bindgen_parameters FORCE 354 354 $(call if_changed_dep,bindgen)
+1 -1
samples/bpf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - BPF_SAMPLES_PATH ?= $(abspath $(srctree)/$(src)) 3 + BPF_SAMPLES_PATH ?= $(abspath $(src)) 4 4 TOOLS_PATH := $(BPF_SAMPLES_PATH)/../../tools 5 5 6 6 pound := \#
+1 -1
samples/hid/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - HID_SAMPLES_PATH ?= $(abspath $(srctree)/$(src)) 3 + HID_SAMPLES_PATH ?= $(abspath $(src)) 4 4 TOOLS_PATH := $(HID_SAMPLES_PATH)/../../tools 5 5 6 6 pound := \#
+1 -2
scripts/Kbuild.include
··· 62 62 63 63 ### 64 64 # The path to Kbuild or Makefile. Kbuild has precedence over Makefile. 65 - kbuild-dir = $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 66 - kbuild-file = $(or $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Makefile) 65 + kbuild-file = $(or $(wildcard $(src)/Kbuild),$(src)/Makefile) 67 66 68 67 ### 69 68 # Read a file, replacing newlines with spaces
+3 -3
scripts/Makefile.asm-generic
··· 9 9 PHONY := all 10 10 all: 11 11 12 - src := $(subst /generated,,$(obj)) 12 + src := $(srctree)/$(subst /generated,,$(obj)) 13 13 14 14 include $(srctree)/scripts/Kbuild.include 15 15 -include $(kbuild-file) ··· 20 20 endif 21 21 22 22 redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y)) 23 - redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f))) 23 + redundant += $(foreach f, $(generic-y), $(if $(wildcard $(src)/$(f)),$(f))) 24 24 redundant := $(sort $(redundant)) 25 25 $(if $(redundant),\ 26 26 $(warning redundant generic-y found in $(src)/Kbuild: $(redundant))) 27 27 28 28 # If arch does not implement mandatory headers, fallback to asm-generic ones. 29 29 mandatory-y := $(filter-out $(generated-y), $(mandatory-y)) 30 - generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f))) 30 + generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(src)/$(f)),,$(f))) 31 31 32 32 generic-y := $(addprefix $(obj)/, $(generic-y)) 33 33 generated-y := $(addprefix $(obj)/, $(generated-y))
+1 -1
scripts/Makefile.build
··· 3 3 # Building 4 4 # ========================================================================== 5 5 6 - src := $(obj) 6 + src := $(if $(VPATH),$(VPATH)/)$(obj) 7 7 8 8 PHONY := $(obj)/ 9 9 $(obj)/:
+1 -1
scripts/Makefile.clean
··· 3 3 # Cleaning up 4 4 # ========================================================================== 5 5 6 - src := $(obj) 6 + src := $(if $(VPATH),$(VPATH)/)$(obj) 7 7 8 8 PHONY := __clean 9 9 __clean:
+5 -5
scripts/Makefile.lib
··· 209 209 -D__KCSAN_INSTRUMENT_BARRIERS__) 210 210 endif 211 211 212 - # $(srctree)/$(src) for including checkin headers from generated source files 213 - # $(objtree)/$(obj) for including generated headers from checkin source files 212 + # $(src) for including checkin headers from generated source files 213 + # $(obj) for including generated headers from checkin source files 214 214 ifeq ($(KBUILD_EXTMOD),) 215 215 ifdef building_out_of_srctree 216 - _c_flags += $(addprefix -I $(srctree)/,$(src)) $(addprefix -I $(objtree)/,$(obj)) 217 - _a_flags += $(addprefix -I $(srctree)/,$(src)) $(addprefix -I $(objtree)/,$(obj)) 218 - _cpp_flags += $(addprefix -I $(srctree)/,$(src)) $(addprefix -I $(objtree)/,$(obj)) 216 + _c_flags += $(addprefix -I, $(src) $(obj)) 217 + _a_flags += $(addprefix -I, $(src) $(obj)) 218 + _cpp_flags += $(addprefix -I, $(src) $(obj)) 219 219 endif 220 220 endif 221 221
+1 -1
scripts/Makefile.modpost
··· 112 112 113 113 # set src + obj - they may be used in the modules's Makefile 114 114 obj := $(KBUILD_EXTMOD) 115 - src := $(obj) 115 + src := $(if $(VPATH),$(VPATH)/)$(obj) 116 116 117 117 # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS 118 118 include $(kbuild-file)
+3 -3
scripts/dtc/Makefile
··· 16 16 fdtoverlay-objs := $(libfdt) fdtoverlay.o util.o 17 17 18 18 # Source files need to get at the userspace version of libfdt_env.h to compile 19 - HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt 19 + HOST_EXTRACFLAGS += -I $(src)/libfdt 20 20 HOST_EXTRACFLAGS += -DNO_YAML 21 21 22 22 # Generated files need one more search path to include headers in source tree 23 - HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) 24 - HOSTCFLAGS_dtc-parser.tab.o := -I $(srctree)/$(src) 23 + HOSTCFLAGS_dtc-lexer.lex.o := -I $(src) 24 + HOSTCFLAGS_dtc-parser.tab.o := -I $(src) 25 25 26 26 # dependencies on generated files need to be listed explicitly 27 27 $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
+1 -1
scripts/gdb/linux/Makefile
··· 2 2 3 3 ifdef building_out_of_srctree 4 4 5 - symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py)) 5 + symlinks := $(patsubst $(src)/%,%,$(wildcard $(src)/*.py)) 6 6 7 7 quiet_cmd_symlink = SYMLINK $@ 8 8 cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(srctree))/$(src)/%,$@) $@
+2 -2
scripts/genksyms/Makefile
··· 23 23 endif 24 24 25 25 # -I needed for generated C source to include headers in source tree 26 - HOSTCFLAGS_parse.tab.o := -I $(srctree)/$(src) 27 - HOSTCFLAGS_lex.lex.o := -I $(srctree)/$(src) 26 + HOSTCFLAGS_parse.tab.o := -I $(src) 27 + HOSTCFLAGS_lex.lex.o := -I $(src) 28 28 29 29 # dependencies on generated files need to be listed explicitly 30 30 $(obj)/lex.lex.o: $(obj)/parse.tab.h
+4 -4
scripts/kconfig/Makefile
··· 57 57 58 58 PHONY += localmodconfig localyesconfig 59 59 localyesconfig localmodconfig: $(obj)/conf 60 - $(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config 60 + $(Q)$(PERL) $(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config 61 61 $(Q)if [ -f .config ]; then \ 62 62 cmp -s .tmp.config .config || \ 63 63 (mv -f .config .config.old.1; \ ··· 118 118 # CHECK: -o cache_dir=<path> working? 119 119 PHONY += testconfig 120 120 testconfig: $(obj)/conf 121 - $(Q)$(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \ 121 + $(Q)$(PYTHON3) -B -m pytest $(src)/tests \ 122 122 -o cache_dir=$(abspath $(obj)/tests/.cache) \ 123 123 $(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no) 124 124 clean-files += tests/.cache ··· 165 165 preprocess.o symbol.o util.o 166 166 167 167 $(obj)/lexer.lex.o: $(obj)/parser.tab.h 168 - HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src) 169 - HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src) 168 + HOSTCFLAGS_lexer.lex.o := -I $(src) 169 + HOSTCFLAGS_parser.tab.o := -I $(src) 170 170 171 171 # conf: Used for defconfig, oldconfig and related targets 172 172 hostprogs += conf
+1 -1
security/tomoyo/Makefile
··· 11 11 printf '\t"";\n';) \ 12 12 } > $@ 13 13 14 - $(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(srctree)/$(src)/policy/*.conf.default) FORCE 14 + $(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(src)/policy/*.conf.default) FORCE 15 15 $(call if_changed,policy) 16 16 17 17 ifndef CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
+1 -1
usr/Makefile
··· 22 22 # If CONFIG_INITRAMFS_SOURCE is empty, generate a small initramfs with the 23 23 # default contents. 24 24 ifeq ($(ramfs-input),) 25 - ramfs-input := $(srctree)/$(src)/default_cpio_list 25 + ramfs-input := $(src)/default_cpio_list 26 26 endif 27 27 28 28 ifeq ($(words $(ramfs-input)),1)
+1 -1
usr/include/Makefile
··· 78 78 cmd_hdrtest = \ 79 79 $(CC) $(c_flags) -fsyntax-only -x c /dev/null \ 80 80 $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \ 81 - $(PERL) $(srctree)/$(src)/headers_check.pl $(obj) $(SRCARCH) $<; \ 81 + $(PERL) $(src)/headers_check.pl $(obj) $(SRCARCH) $<; \ 82 82 touch $@ 83 83 84 84 $(obj)/%.hdrtest: $(obj)/%.h FORCE