From: Elliott Mitchell <ehem+linux@m5p.com>
To: masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu
Cc: linux-kbuild@vger.kernel.org
Subject: [WIP PATCH 03/30] build: handle optional trailing slash in $(srctree)
Date: Sun, 3 Mar 2024 14:11:40 -0800 [thread overview]
Message-ID: <638b391487bbaeb16e17666ee490d95dffb08d7b.1709508290.git.ehem+linux@m5p.com> (raw)
In-Reply-To: <cover.1709508290.git.ehem+linux@m5p.com>
Required intermediate to continue function during intermediate steps.
Signed-off-by: Elliott Mitchell <ehem+linux@m5p.com>
---
---
Documentation/Makefile | 2 +-
Documentation/devicetree/bindings/Makefile | 6 +++---
Documentation/userspace-api/media/Makefile | 2 +-
arch/arc/boot/dts/Makefile | 2 +-
arch/csky/boot/dts/Makefile | 2 +-
arch/nios2/boot/dts/Makefile | 2 +-
arch/powerpc/boot/dts/Makefile | 2 +-
arch/powerpc/boot/dts/fsl/Makefile | 2 +-
arch/xtensa/boot/dts/Makefile | 2 +-
lib/Makefile | 2 +-
10 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 85d8deace4bf..d279c8b71280 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -21,7 +21,7 @@ SPHINXOPTS =
SPHINXDIRS = .
DOCS_THEME =
DOCS_CSS =
-_SPHINXDIRS = $(sort $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)))
+_SPHINXDIRS = $(sort $(patsubst $(srctree:%/=%)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)))
SPHINX_CONF = conf.py
PAPER =
BUILDDIR = $(obj)/output
diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index 129cf698fa8a..d22bd9ec8dbf 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -55,7 +55,7 @@ define rule_chkdt
$(call cmd,mk_schema)
endef
-DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_all_cmd)))
+DT_DOCS = $(patsubst $(srctree:%/=%)/%,%,$(shell $(find_all_cmd)))
override DTC_FLAGS := \
-Wno-avoid_unnecessary_addr_size \
@@ -71,8 +71,8 @@ $(obj)/processed-schema.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version
$(call if_changed_rule,chkdt)
always-y += processed-schema.json
-always-$(CHECK_DT_BINDING) += $(patsubst $(srctree)/$(src)/%.yaml,%.example.dts, $(CHK_DT_DOCS))
-always-$(CHECK_DT_BINDING) += $(patsubst $(srctree)/$(src)/%.yaml,%.example.dtb, $(CHK_DT_DOCS))
+always-$(CHECK_DT_BINDING) += $(patsubst $(srctree:%/=%)/$(src)/%.yaml,%.example.dts, $(CHK_DT_DOCS))
+always-$(CHECK_DT_BINDING) += $(patsubst $(srctree:%/=%)/$(src)/%.yaml,%.example.dtb, $(CHK_DT_DOCS))
# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
# build artifacts here before they are processed by scripts/Makefile.clean
diff --git a/Documentation/userspace-api/media/Makefile b/Documentation/userspace-api/media/Makefile
index 3d8aaf5c253b..863c08c2d925 100644
--- a/Documentation/userspace-api/media/Makefile
+++ b/Documentation/userspace-api/media/Makefile
@@ -16,7 +16,7 @@ gen_rst = \
echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
-quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
+quiet_gen_rst = echo ' PARSE $(patsubst $(srctree:%/=%)/%,%,$<)'; \
${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
silent_gen_rst = ${gen_rst}
diff --git a/arch/arc/boot/dts/Makefile b/arch/arc/boot/dts/Makefile
index 4237aa5de3a3..5b27c668afe1 100644
--- a/arch/arc/boot/dts/Makefile
+++ b/arch/arc/boot/dts/Makefile
@@ -10,7 +10,7 @@ obj-y += $(builtindtb-y).dtb.o
dtb-y := $(builtindtb-y).dtb
# for CONFIG_OF_ALL_DTBS test
-dtstree := $(srctree)/$(src)
+dtstree := $(srctree:%/=%)/$(src)
dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
# board-specific dtc flags
diff --git a/arch/csky/boot/dts/Makefile b/arch/csky/boot/dts/Makefile
index 5f1f55e911ad..fdb7571758a2 100644
--- a/arch/csky/boot/dts/Makefile
+++ b/arch/csky/boot/dts/Makefile
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
-dtstree := $(srctree)/$(src)
+dtstree := $(srctree:%/=%)/$(src)
dtb-y := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
diff --git a/arch/nios2/boot/dts/Makefile b/arch/nios2/boot/dts/Makefile
index e9e31bb40df8..1093e2111af0 100644
--- a/arch/nios2/boot/dts/Makefile
+++ b/arch/nios2/boot/dts/Makefile
@@ -2,5 +2,5 @@
obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
-dtstree := $(srctree)/$(src)
+dtstree := $(srctree:%/=%)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile
index fb335d05aae8..211b96e6ee6d 100644
--- a/arch/powerpc/boot/dts/Makefile
+++ b/arch/powerpc/boot/dts/Makefile
@@ -2,5 +2,5 @@
subdir-y += fsl
-dtstree := $(srctree)/$(src)
+dtstree := $(srctree:%/=%)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
diff --git a/arch/powerpc/boot/dts/fsl/Makefile b/arch/powerpc/boot/dts/fsl/Makefile
index 3bae982641e9..ee7110fbbdbe 100644
--- a/arch/powerpc/boot/dts/fsl/Makefile
+++ b/arch/powerpc/boot/dts/fsl/Makefile
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
-dtstree := $(srctree)/$(src)
+dtstree := $(srctree:%/=%)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
diff --git a/arch/xtensa/boot/dts/Makefile b/arch/xtensa/boot/dts/Makefile
index 720628c0d8b9..9f69eaee2188 100644
--- a/arch/xtensa/boot/dts/Makefile
+++ b/arch/xtensa/boot/dts/Makefile
@@ -10,5 +10,5 @@
obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
# for CONFIG_OF_ALL_DTBS test
-dtstree := $(srctree)/$(src)
+dtstree := $(srctree:%/=%)/$(src)
dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
diff --git a/lib/Makefile b/lib/Makefile
index 6b09731d8e61..8511d8006fd1 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -413,7 +413,7 @@ obj-$(CONFIG_FIRMWARE_TABLE) += fw_table.o
# FORTIFY_SOURCE compile-time behavior tests
TEST_FORTIFY_SRCS = $(wildcard $(srctree)/$(src)/test_fortify/*-*.c)
-TEST_FORTIFY_LOGS = $(patsubst $(srctree)/$(src)/%.c, %.log, $(TEST_FORTIFY_SRCS))
+TEST_FORTIFY_LOGS = $(patsubst $(srctree:%/=%)/$(src)/%.c, %.log, $(TEST_FORTIFY_SRCS))
TEST_FORTIFY_LOG = test_fortify.log
quiet_cmd_test_fortify = TEST $@
--
2.39.2
next prev parent reply other threads:[~2024-03-04 2:09 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-03 23:24 [WIP PATCH 00/30] Adding trailing slash to $(*tree) Elliott Mitchell
2024-03-01 19:48 ` [WIP PATCH 29/30] tools/build: modify uses of $(srctree) to assume trailing slash Elliott Mitchell
2024-03-01 19:48 ` [WIP PATCH 07/30] build: " Elliott Mitchell
2024-03-01 19:48 ` [WIP PATCH 06/30] " Elliott Mitchell
2024-03-01 19:48 ` [WIP PATCH 11/30] scripts: " Elliott Mitchell
2024-03-01 20:03 ` [WIP PATCH 08/30] build: " Elliott Mitchell
2024-03-01 20:03 ` [WIP PATCH 12/30] scripts: " Elliott Mitchell
2024-03-01 20:51 ` [WIP PATCH 01/30] build: replace uses of $(abspath ) with existing variables Elliott Mitchell
2024-03-04 9:50 ` Nicolas Schier
2024-03-04 10:01 ` Nicolas Schier
2024-03-04 19:45 ` Elliott Mitchell
2024-03-05 10:51 ` Nicolas Schier
2024-03-01 23:26 ` [WIP PATCH 16/30] scripts/dtc: dtx_diff: include trailing slash in ${srctree} variable Elliott Mitchell
2024-03-01 23:50 ` [WIP PATCH 02/30] scripts/coccicheck: modify to handle ${srctree} with trailing slash Elliott Mitchell
2024-03-01 23:50 ` [WIP PATCH 25/30] " Elliott Mitchell
2024-03-02 0:29 ` [WIP PATCH 15/30] build/scripts: install.sh: modify use of ${srctree} for " Elliott Mitchell
2024-03-02 0:32 ` [WIP PATCH 17/30] build/scripts: generate_initcall_order.pl: " Elliott Mitchell
2024-03-02 0:33 ` [WIP PATCH 18/30] build/scripts: streamline_config.pl: " Elliott Mitchell
2024-03-02 1:08 ` [WIP PATCH 14/30] build/scripts: link-vmlinux.sh: modify use of ${objtree} " Elliott Mitchell
2024-03-02 1:43 ` [WIP PATCH 19/30] scripts/package: mkdebian: modify use of ${srctree} to assume " Elliott Mitchell
2024-03-02 1:43 ` [WIP PATCH 20/30] scripts/package: buildtar: " Elliott Mitchell
2024-03-02 1:46 ` [WIP PATCH 22/30] scripts/nsdeps: " Elliott Mitchell
2024-03-02 1:47 ` [WIP PATCH 23/30] build/scripts: makelst: modify suggested use of ${srctree} for " Elliott Mitchell
2024-03-02 2:01 ` [WIP PATCH 21/30] scripts/package: mkspec: modify use of ${srctree} to assume " Elliott Mitchell
2024-03-02 2:02 ` [WIP PATCH 24/30] scripts/generate_rust_analyzer.py: modify use of ${srctree} for " Elliott Mitchell
2024-03-03 22:11 ` Elliott Mitchell [this message]
2024-03-03 23:24 ` [WIP PATCH 09/30] build: modify uses of $(objtree) to assume " Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 10/30] scripts: modify uses of $(srctree) " Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 30/30] tools/build: modify uses of $(objtree) " Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 13/30] scripts: " Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 05/30] build: modify uses of $(srctree) " Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 28/30] tools/build: " Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 26/30] build: change $(*tree) to empty for current directory Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 27/30] tools/build: add trailing slash to $(*tree) Elliott Mitchell
2024-03-03 23:24 ` [WIP PATCH 04/30] build: " Elliott Mitchell
2024-03-04 9:57 ` [WIP PATCH 00/30] Adding " Nicolas Schier
2024-03-04 19:36 ` Elliott Mitchell
2024-03-05 10:43 ` Nicolas Schier
2024-03-07 0:02 ` Elliott Mitchell
2024-03-05 15:20 ` Masahiro Yamada
2024-03-07 0:09 ` Elliott Mitchell
2024-03-10 13:07 ` Masahiro Yamada
2024-03-12 0:15 ` Elliott Mitchell
2024-03-13 4:22 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=638b391487bbaeb16e17666ee490d95dffb08d7b.1709508290.git.ehem+linux@m5p.com \
--to=ehem+linux@m5p.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox