Skip to content

Commit b1992c3

Browse files
committed
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>
1 parent 9a0ebe5 commit b1992c3

File tree

102 files changed

+173
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+173
-182
lines changed

Documentation/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,22 @@ loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;
7676
# * dest folder relative to $(BUILDDIR) and
7777
# * cache folder relative to $(BUILDDIR)/.doctrees
7878
# $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),
8080
# e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media
8181

8282
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
8383
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \
8484
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)) \
8686
$(PYTHON3) $(srctree)/scripts/jobserver-exec \
8787
$(CONFIG_SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \
8888
$(SPHINXBUILD) \
8989
-b $2 \
90-
-c $(abspath $(srctree)/$(src)) \
90+
-c $(abspath $(src)) \
9191
-d $(abspath $(BUILDDIR)/.doctrees/$3) \
9292
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
9393
$(ALLSPHINXOPTS) \
94-
$(abspath $(srctree)/$(src)/$5) \
94+
$(abspath $(src)/$5) \
9595
$(abspath $(BUILDDIR)/$3/$4) && \
9696
if [ "x$(DOCS_CSS)" != "x" ]; then \
9797
cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \

Documentation/devicetree/bindings/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ quiet_cmd_extract_ex = DTEX $@
2525
$(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
2626
$(call if_changed,extract_ex)
2727

28-
find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
28+
find_all_cmd = find $(src) \( -name '*.yaml' ! \
2929
-name 'processed-schema*' \)
3030

3131
find_cmd = $(find_all_cmd) | \
@@ -37,12 +37,12 @@ CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, $(shell $(find_cm
3737
quiet_cmd_yamllint = LINT $(src)
3838
cmd_yamllint = ($(find_cmd) | \
3939
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) \
4141
&& touch $@ || true
4242

4343
quiet_cmd_chk_bindings = CHKDT $(src)
4444
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)) \
4646
&& touch $@ || true
4747

4848
quiet_cmd_mk_schema = SCHEMA $@

Documentation/kbuild/makefiles.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ ccflags-y, asflags-y and ldflags-y
346346
Example::
347347

348348
#arch/cris/boot/compressed/Makefile
349-
ldflags-y += -T $(srctree)/$(src)/decompress_$(arch-y).lds
349+
ldflags-y += -T $(src)/decompress_$(arch-y).lds
350350

351351
subdir-ccflags-y, subdir-asflags-y
352352
The two flags listed above are similar to ccflags-y and asflags-y.
@@ -426,14 +426,14 @@ path to prerequisite files and target files.
426426
Two variables are used when defining custom rules:
427427

428428
$(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
431430
referring to files located in the src tree.
432431

433432
$(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).
437437

438438
Example::
439439

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,14 @@ srctree := $(abs_srctree)
263263
endif
264264

265265
objtree := .
266+
267+
VPATH :=
268+
269+
ifeq ($(KBUILD_EXTMOD),)
270+
ifdef building_out_of_srctree
266271
VPATH := $(srctree)
272+
endif
273+
endif
267274

268275
export building_out_of_srctree srctree objtree VPATH
269276

arch/arc/boot/dts/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ obj-y += $(builtindtb-y).dtb.o
1010
dtb-y := $(builtindtb-y).dtb
1111

1212
# 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))
1514

1615
# board-specific dtc flags
1716
DTC_FLAGS_hsdk += --pad 20

arch/arm/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
obj-$(CONFIG_FPE_NWFPE) += nwfpe/
33
# 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/))
55
obj-$(CONFIG_VFP) += vfp/
66
obj-$(CONFIG_XEN) += xen/
77
obj-$(CONFIG_VDSO) += vdso/

arch/arm/boot/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ targets := Image zImage xipImage bootpImage uImage
2525

2626
ifeq ($(CONFIG_XIP_KERNEL),y)
2727

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 $< $@'
3029

3130
ifeq ($(CONFIG_XIP_DEFLATED_DATA),y)
3231
quiet_cmd_mkxip = XIPZ $@

arch/arm/mach-s3c/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Copyright 2009 Simtec Electronics
44

5-
include $(srctree)/$(src)/Makefile.s3c64xx
5+
include $(src)/Makefile.s3c64xx
66

77
# Objects we always build independent of SoC choice
88

arch/arm/plat-orion/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for the linux kernel.
44
#
5-
ccflags-y := -I$(srctree)/$(src)/include
5+
ccflags-y := -I$(src)/include
66

77
orion-gpio-$(CONFIG_GPIOLIB) += gpio.o
88
obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o

arch/arm/tools/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ gen := arch/$(ARCH)/include/generated
99
kapi := $(gen)/asm
1010
uapi := $(gen)/uapi/asm
1111
syshdr := $(srctree)/scripts/syscallhdr.sh
12-
sysnr := $(srctree)/$(src)/syscallnr.sh
12+
sysnr := $(src)/syscallnr.sh
1313
systbl := $(srctree)/scripts/syscalltbl.sh
1414
syscall := $(src)/syscall.tbl
1515

arch/arm64/kernel/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
6868
$(call if_changed,objcopy)
6969

7070
# Generate VDSO offsets using helper script
71-
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
71+
gen-vdsosym := $(src)/gen_vdso_offsets.sh
7272
quiet_cmd_vdsosym = VDSOSYM $@
7373
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
7474

arch/arm64/kvm/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Makefile for Kernel-based Virtual Machine module
44
#
55

6-
ccflags-y += -I $(srctree)/$(src)
6+
ccflags-y += -I $(src)
77

88
include $(srctree)/virt/kvm/Makefile.kvm
99

@@ -30,7 +30,7 @@ define rule_gen_hyp_constants
3030
$(call filechk,offsets,__HYP_CONSTANTS_H__)
3131
endef
3232

33-
CFLAGS_hyp-constants.o = -I $(srctree)/$(src)/hyp/include
33+
CFLAGS_hyp-constants.o = -I $(src)/hyp/include
3434
$(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE
3535
$(call if_changed_dep,cc_s_c)
3636

arch/arm64/kvm/hyp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Makefile for Kernel-based Virtual Machine module, HYP part
44
#
55

6-
incdir := $(srctree)/$(src)/include
6+
incdir := $(src)/include
77
subdir-asflags-y := -I$(incdir)
88
subdir-ccflags-y := -I$(incdir)
99

arch/csky/boot/dts/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
# 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))

arch/csky/kernel/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ quiet_cmd_vdsold = VDSOLD $@
5757
# Extracts symbol offsets from the VDSO, converting them into an assembly file
5858
# that contains the same symbols at the same offsets.
5959
quiet_cmd_so2s = SO2S $@
60-
cmd_so2s = $(NM) -D $< | $(srctree)/$(src)/so2s.sh > $@
60+
cmd_so2s = $(NM) -D $< | $(src)/so2s.sh > $@

arch/loongarch/kvm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Makefile for LoongArch KVM support
44
#
55

6-
ccflags-y += -I $(srctree)/$(src)
6+
ccflags-y += -I $(src)
77

88
include $(srctree)/virt/kvm/Makefile.kvm
99

arch/loongarch/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ quiet_cmd_vdsoas_o_S = AS $@
5252
cmd_vdsoas_o_S = $(CC) $(a_flags) -c -o $@ $<
5353

5454
# Generate VDSO offsets using helper script
55-
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
55+
gen-vdsosym := $(src)/gen_vdso_offsets.sh
5656
quiet_cmd_vdsosym = VDSOSYM $@
5757
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
5858

arch/mips/kernel/syscalls/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm
55
$(shell mkdir -p $(uapi) $(kapi))
66

77
syshdr := $(srctree)/scripts/syscallhdr.sh
8-
sysnr := $(srctree)/$(src)/syscallnr.sh
8+
sysnr := $(src)/syscallnr.sh
99
systbl := $(srctree)/scripts/syscalltbl.sh
1010

1111
quiet_cmd_syshdr = SYSHDR $@

arch/mips/vdso/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ CFLAGS_vgettimeofday.o = -include $(c-gettimeofday-y)
4343
# config-n32-o32-env.c prepares the environment to build a 32bit vDSO
4444
# library on a 64bit kernel.
4545
# 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)
4848
endif
4949

5050
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)

arch/nios2/boot/dts/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
44

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))

arch/parisc/kernel/vdso32/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ quiet_cmd_vdso32as = VDSO32A $@
4040
cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
4141

4242
# Generate VDSO offsets using helper script
43-
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
43+
gen-vdsosym := $(src)/gen_vdso_offsets.sh
4444
quiet_cmd_vdsosym = VDSOSYM $@
4545
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
4646

arch/parisc/kernel/vdso64/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ quiet_cmd_vdso64as = VDSO64A $@
4040
cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
4141

4242
# Generate VDSO offsets using helper script
43-
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
43+
gen-vdsosym := $(src)/gen_vdso_offsets.sh
4444
quiet_cmd_vdsosym = VDSOSYM $@
4545
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
4646

arch/powerpc/boot/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ $(addprefix $(obj)/,$(libfdt) $(libfdtheader)): $(obj)/%: $(srctree)/scripts/dtc
218218
$(obj)/empty.c:
219219
$(Q)touch $@
220220

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
222222
$(Q)cp $< $@
223223

224224
clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \
@@ -252,9 +252,9 @@ targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds
252252
extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
253253
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
254254

255-
dtstree := $(srctree)/$(src)/dts
255+
dtstree := $(src)/dts
256256

257-
wrapper :=$(srctree)/$(src)/wrapper
257+
wrapper := $(src)/wrapper
258258
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
259259
$(wrapper) FORCE
260260

arch/powerpc/boot/dts/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
subdir-y += fsl
44

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))

arch/powerpc/boot/dts/fsl/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0
22

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))

arch/powerpc/kernel/vdso/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ $(obj)/vgettimeofday-64.o: %-64.o: %.c FORCE
9090
$(call if_changed_dep,cc_o_c)
9191

9292
# Generate VDSO offsets using helper script
93-
gen-vdso32sym := $(srctree)/$(src)/gen_vdso32_offsets.sh
93+
gen-vdso32sym := $(src)/gen_vdso32_offsets.sh
9494
quiet_cmd_vdso32sym = VDSO32SYM $@
9595
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
9797
quiet_cmd_vdso64sym = VDSO64SYM $@
9898
cmd_vdso64sym = $(NM) $< | $(gen-vdso64sym) | LC_ALL=C sort > $@
9999

arch/riscv/kernel/compat_vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
5858
$(call if_changed,objcopy)
5959

6060
# 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
6262
quiet_cmd_compat_vdsosym = VDSOSYM $@
6363
cmd_compat_vdsosym = $(NM) $< | $(gen-compat_vdsosym) | LC_ALL=C sort > $@
6464

arch/riscv/kernel/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
6060
$(call if_changed,objcopy)
6161

6262
# Generate VDSO offsets using helper script
63-
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
63+
gen-vdsosym := $(src)/gen_vdso_offsets.sh
6464
quiet_cmd_vdsosym = VDSOSYM $@
6565
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
6666

arch/riscv/kvm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Makefile for RISC-V KVM support
44
#
55

6-
ccflags-y += -I $(srctree)/$(src)
6+
ccflags-y += -I $(src)
77

88
include $(srctree)/virt/kvm/Makefile.kvm
99

arch/s390/kernel/syscalls/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ gen := arch/$(ARCH)/include/generated
44
kapi := $(gen)/asm
55
uapi := $(gen)/uapi/asm
66

7-
syscall := $(srctree)/$(src)/syscall.tbl
8-
systbl := $(srctree)/$(src)/syscalltbl
7+
syscall := $(src)/syscall.tbl
8+
systbl := $(src)/syscalltbl
99

1010
gen-y := $(kapi)/syscall_table.h
1111
kapi-hdrs-y := $(kapi)/unistd_nr.h

arch/s390/kernel/vdso32/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ quiet_cmd_vdso32cc = VDSO32C $@
6262
cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $<
6363

6464
# Generate VDSO offsets using helper script
65-
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
65+
gen-vdsosym := $(src)/gen_vdso_offsets.sh
6666
quiet_cmd_vdsosym = VDSOSYM $@
6767
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
6868

arch/s390/kernel/vdso64/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ quiet_cmd_vdso64cc = VDSO64C $@
7272
cmd_vdso64cc = $(CC) $(c_flags) -c -o $@ $<
7373

7474
# Generate VDSO offsets using helper script
75-
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh
75+
gen-vdsosym := $(src)/gen_vdso_offsets.sh
7676
quiet_cmd_vdsosym = VDSOSYM $@
7777
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
7878

arch/sparc/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ quiet_cmd_vdso = VDSO $@
103103
cmd_vdso = $(LD) -nostdlib -o $@ \
104104
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
105105
-T $(filter %.lds,$^) $(filter %.o,$^) && \
106-
sh $(srctree)/$(src)/checkundef.sh '$(OBJDUMP)' '$@'
106+
sh $(src)/checkundef.sh '$(OBJDUMP)' '$@'
107107

108108
VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic
109109
GCOV_PROFILE := n

arch/um/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
4747
$(call if_changed,quote2)
4848

4949
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 $@ $^
5151

5252
cpufeature = $(src)/../../x86/include/asm/cpufeatures.h
5353
vmxfeature = $(src)/../../x86/include/asm/vmxfeatures.h

arch/x86/boot/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ targets += mtools.conf
129129
# genimage.sh requires bash, but it also has a bunch of other
130130
# external dependencies.
131131
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 \
133133
$(obj)/mtools.conf '$(FDARGS)' $(FDINITRD)
134134

135135
PHONY += bzdisk fdimage fdimage144 fdimage288 hdimage isoimage

0 commit comments

Comments
 (0)