From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 5/6] Makefile: Use a variable for generated of-platdata headers
Date: Thu, 25 Mar 2021 06:40:52 +1300 [thread overview]
Message-ID: <20210324174053.4180445-6-sjg@chromium.org> (raw)
In-Reply-To: <20210324174053.4180445-1-sjg@chromium.org>
There are actually two generated files but only one is currently mentioned
in the Makefile as a dependency. Put them both in a Makefile variable and
use that instead, to avoid inconsistency.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Add a comment to the endif
scripts/Makefile.spl | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 5f37a82931e..11e9f6a17eb 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -120,13 +120,14 @@ endif
u-boot-spl-init := $(head-y)
u-boot-spl-main := $(libs-y)
ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA
+platdata-hdr := include/generated/dt-structs-gen.h include/generated/dt-decl.h
ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA_INST
u-boot-spl-platdata := $(obj)/dts/dt-uclass.o $(obj)/dts/dt-device.o
else
u-boot-spl-platdata := $(obj)/dts/dt-plat.o
endif
u-boot-spl-platdata_c := $(patsubst %.o,%.c,$(u-boot-spl-platdata))
-endif
+endif # OF_PLATDATA
# Linker Script
# First test whether there's a linker-script for the specific stage defined...
@@ -327,15 +328,11 @@ cmd_dtoc = $(DTOC_ARGS) -c $(obj)/dts -C include/generated all
quiet_cmd_plat = PLAT $@
cmd_plat = $(CC) $(c_flags) -c $< -o $(filter-out $(PHONY),$@)
-targets += $(u-boot-spl-platdata)
-
-$(obj)/dts/dt-%.o: $(obj)/dts/dt-%.c \
- include/generated/dt-structs-gen.h prepare FORCE
+$(obj)/dts/dt-%.o: $(obj)/dts/dt-%.c $(platdata-hdr)
$(call if_changed,plat)
# Don't use dts_dir here, since it forces running this expensive rule every time
-include/generated/dt-structs-gen.h $(u-boot-spl-platdata_c) &: \
- $(obj)/$(SPL_BIN).dtb
+$(platdata-hdr) $(u-boot-spl-platdata_c) &: $(obj)/$(SPL_BIN).dtb
@[ -d $(obj)/dts ] || mkdir -p $(obj)/dts
$(call if_changed,dtoc)
--
2.31.0.291.g576ba9dcdaf-goog
next prev parent reply other threads:[~2021-03-24 17:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 17:40 [PATCH v2 0/6] Makefile: Tidy up of-platdata file generation rules Simon Glass
2021-03-24 17:40 ` Simon Glass
2021-03-24 17:40 ` [PATCH v2 1/6] libfdt: Tidy up pylibfdt build rule Simon Glass
2021-03-24 17:40 ` Simon Glass
2021-03-24 17:40 ` [PATCH v2 2/6] Makefile: Avoid running dtoc every time Simon Glass
2021-03-24 17:40 ` [PATCH v2 3/6] Makefile: Depend only on required of-platdata files Simon Glass
2021-03-24 17:40 ` [PATCH v2 4/6] dtoc: Only generate the required files Simon Glass
2021-03-24 17:40 ` Simon Glass [this message]
2021-03-24 17:40 ` [PATCH v2 6/6] Makefile: Remove old of-platdata files before regenerating Simon Glass
2021-03-26 3:18 ` Simon Glass
2021-03-26 3:18 ` [PATCH v2 5/6] Makefile: Use a variable for generated of-platdata headers Simon Glass
2021-03-26 3:18 ` [PATCH v2 4/6] dtoc: Only generate the required files Simon Glass
2021-03-26 3:18 ` [PATCH v2 3/6] Makefile: Depend only on required of-platdata files Simon Glass
2021-03-26 3:18 ` [PATCH v2 2/6] Makefile: Avoid running dtoc every time Simon Glass
2021-03-26 3:18 ` [PATCH v2 1/6] libfdt: Tidy up pylibfdt build rule Simon Glass
2021-03-26 3:18 ` Simon Glass
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=20210324174053.4180445-6-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.