From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/5] kbuild: images: fix missing FORCE prerequisite
Date: Mon, 2 Dec 2024 13:44:02 +0100 [thread overview]
Message-ID: <20241202124404.1814203-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20241202124404.1814203-1-a.fatoum@pengutronix.de>
With the recent changes updating fixdep, we now get warnings when we
miss the FORCE prerequisite:
images/Makefile:151: FORCE prerequisite is missing
Fix this by adding the missing FORCE and using if_changed as intended.
While at it, we also make the output a little less verbose, so the
SHIPPED/DELETE output is omitted:
SHIPPED images/barebox-nxp-imx8mm-evk.img
SHIPPED images/barebox-prt-prt8mm.img
DELETE images/barebox-tqma93xx.img
images built:
barebox-nxp-imx8mm-evk.img
barebox-prt-prt8mm.img
** barebox-tqma93xx.img skipped due to missing firmware **
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
images/Makefile | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/images/Makefile b/images/Makefile
index f781ecb59ccb..5ce563a426ab 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -144,11 +144,13 @@ $(obj)/barebox.z: $(obj)/../barebox.bin FORCE
missing_fw = $(strip $(wildcard $(obj)/$(FILE_$(@F)).missing-firmware $(basename $(obj)/$(FILE_$(@F))).missing-firmware))
+quiet_cmd_report_missing_fw = # no message as we collect info for later
+ cmd_report_missing_fw = $(if $2,cat $2 >$@.missing-firmware;$(cmd_delete),rm -f $@.missing-firmware;$(cmd_shipped))
+
.SECONDEXPANSION:
-$(obj)/%.img: $(obj)/$$(FILE_$$(@F))
+$(obj)/%.img: $(obj)/$$(FILE_$$(@F)) FORCE
$(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi
- $(Q)$(if $(missing_fw),cat $(missing_fw) >$@.missing-firmware,rm -f $@.missing-firmware)
- $(call if_changed,$(if $(missing_fw),delete,shipped))
+ $(call if_changed,report_missing_fw,$(missing_fw))
board = $(srctree)/arch/$(SRCARCH)/boards
objboard = $(objtree)/arch/$(SRCARCH)/boards
--
2.39.5
next prev parent reply other threads:[~2024-12-02 12:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 12:44 [PATCH 1/5] kbuild: images: don't compare filesizes if file didn't change Ahmad Fatoum
2024-12-02 12:44 ` [PATCH 2/5] kbuild: images: don't check for missing FW " Ahmad Fatoum
2024-12-03 8:24 ` Ahmad Fatoum
2024-12-02 12:44 ` Ahmad Fatoum [this message]
2024-12-02 12:44 ` [PATCH 4/5] kbuild: don't prelink if input " Ahmad Fatoum
2024-12-02 12:44 ` [PATCH 5/5] kbuild: images: don't compute size " Ahmad Fatoum
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=20241202124404.1814203-3-a.fatoum@pengutronix.de \
--to=a.fatoum@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