mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 4/5] images: don't prelink if input file didn't change
Date: Thu, 12 Dec 2024 09:30:32 +0100	[thread overview]
Message-ID: <20241212083033.2560690-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20241212083033.2560690-1-a.fatoum@pengutronix.de>

If the input file hasn't changed, there is no need to re-prelink it.
Thus turn the cmd into a if_changed and ensure it's not empty as
otherwise, make will raise an error.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 images/Makefile      | 4 ++--
 scripts/Makefile.lib | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/images/Makefile b/images/Makefile
index 5ce563a426ab..0ef2ea6bf6de 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -68,11 +68,11 @@ PBL_CPPFLAGS	+= -fdata-sections -ffunction-sections
 
 $(obj)/%.pbl: $(pbl-lds) $(BAREBOX_PBL_OBJS) $(obj)/piggy.o $(obj)/sha_sum.o FORCE
 	$(call if_changed,elf__,$(*F))
-	$(call cmd,prelink__)
+	$(call if_changed,prelink__)
 
 $(obj)/%.elf: $(pbl-lds) $(BAREBOX_PBL_OBJS) $(obj)/piggy.o $(obj)/sha_sum.o FORCE
 	$(call if_changed,elf__,$(*F))
-	$(call cmd,prelink__)
+	$(call if_changed,prelink__)
 
 $(obj)/%.pblb: $(obj)/%.pbl FORCE
 	$(call if_changed,objcopy_bin,$(*F))
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index e2d0168550f8..19aa506dc645 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -282,7 +282,7 @@ quiet_cmd_prelink__ = PRELINK $@
 endif
 
 quiet_cmd_prelink__ ?=
-      cmd_prelink__ ?=
+      cmd_prelink__ ?= :
 
 # Linking
 # ---------------------------------------------------------------------------
-- 
2.39.5




  parent reply	other threads:[~2024-12-12  8:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12  8:30 [PATCH v2 0/5] images: fix issues around misuse of FORCE Ahmad Fatoum
2024-12-12  8:30 ` [PATCH v2 1/5] images: don't compare filesizes if file didn't change Ahmad Fatoum
2024-12-12  8:30 ` [PATCH v2 2/5] images: don't check for missing FW " Ahmad Fatoum
2024-12-12  8:30 ` [PATCH v2 3/5] images: fix missing FORCE prerequisite Ahmad Fatoum
2024-12-12  8:30 ` Ahmad Fatoum [this message]
2024-12-12  8:30 ` [PATCH v2 5/5] images: don't compute size if input file didn't change Ahmad Fatoum
2024-12-16  8:20 ` [PATCH v2 0/5] images: fix issues around misuse of FORCE 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=20241212083033.2560690-5-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