mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] firmware: Makefile: fix firmware file dependency tracking
Date: Thu,  1 Dec 2022 15:54:18 +0100	[thread overview]
Message-ID: <20221201145418.2709053-1-m.felsch@pengutronix.de> (raw)

Commit 663894d99c64 ("firmware: refactor firmware/Makefile") aligned the
barebox code with the kernel code. This commit replaced the usage of
$(fw-external-y) by $(obj-pbl-y) and added the '.gen.o' suffix directly
but didn't adapted the patsubst logic for tracking the binary firmware
files. As result a firmware binary file update is not recognized by make
and and won't make into the final binary. This commit fixes this and so
an update will be recognized automatically without require a 'make
clean' before.

Fixes: 663894d99c64 ("firmware: refactor firmware/Makefile")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 firmware/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/firmware/Makefile b/firmware/Makefile
index f6ff5b831b..da341871d6 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -79,11 +79,11 @@ $(obj)/%.sum: $(obj)/% FORCE
 clean-files += *.sha.bin *.sum
 
 # The .o files depend on the binaries directly; the .S files don't.
-$(patsubst %,$(obj)/%.gen.o, $(obj-pbl-y)): $(obj)/%.gen.o: $(fwdir)/%
+$(patsubst %.gen.o,$(obj)/%.gen.o, $(obj-pbl-y)): $(obj)/%.gen.o: $(fwdir)/%
 
 # The same for pbl:
-$(patsubst %,$(obj)/%.gen.pbl.o, $(obj-pbl-y)): $(obj)/%.gen.pbl.o: $(fwdir)/%
-$(patsubst %,$(obj)/%.extgen.pbl.o, $(pbl-y)): $(obj)/%.extgen.pbl.o: $(fwdir)/%
+$(patsubst %.gen.o,$(obj)/%.gen.pbl.o, $(obj-pbl-y)): $(obj)/%.gen.pbl.o: $(fwdir)/%
+$(patsubst %.gen.o,$(obj)/%.extgen.pbl.o, $(pbl-y)): $(obj)/%.extgen.pbl.o: $(fwdir)/%
 
 pbl-y := $(addsuffix .extgen.o, $(fw-external-y))
 
-- 
2.30.2




             reply	other threads:[~2022-12-01 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 14:54 Marco Felsch [this message]
2022-12-02  9:00 ` Sascha Hauer

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=20221201145418.2709053-1-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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