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 5/5] kbuild: images: don't compute size if input file didn't change
Date: Mon,  2 Dec 2024 13:44:04 +0100	[thread overview]
Message-ID: <20241202124404.1814203-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20241202124404.1814203-1-a.fatoum@pengutronix.de>

If the input file didn't change, there is no point in repeating image
size checks and cluttering the log. Therefore use if_changed and remove
the extraneous semicolon, which make would then complain about.

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

diff --git a/images/Makefile b/images/Makefile
index 0ef2ea6bf6de..a74aa6023e73 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -100,15 +100,15 @@ $(obj)/%.pblb: $(obj)/%.pbl FORCE
 # code/memory/image for this PBL may get. Check these values.
 #
 	$(if $(MAX_PBL_CODE_SIZE_$*), \
-		$(call cmd,check_size, $(PBL_CODE_SIZE_$*), $(MAX_PBL_CODE_SIZE_$*)) \
+		$(call if_changed,check_size,$(PBL_CODE_SIZE_$*),$(MAX_PBL_CODE_SIZE_$*)) \
 	)
 
 	$(if $(MAX_PBL_MEMORY_SIZE_$*), \
-		$(call cmd,check_size, $(PBL_MEMORY_SIZE_$*), $(MAX_PBL_MEMORY_SIZE_$*)) \
+		$(call if_changed,check_size,$(PBL_MEMORY_SIZE_$*),$(MAX_PBL_MEMORY_SIZE_$*)) \
 	)
 
 	$(if $(MAX_PBL_IMAGE_SIZE_$*), \
-		$(call cmd,check_size, $(PBL_IMAGE_SIZE_$*), $(MAX_PBL_IMAGE_SIZE_$*)) \
+		$(call if_changed,check_size,$(PBL_IMAGE_SIZE_$*),$(MAX_PBL_IMAGE_SIZE_$*)) \
 	)
 
 $(obj)/%.s: $(obj)/% FORCE
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 19aa506dc645..c32adf07cc51 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -520,7 +520,7 @@ quiet_cmd_check_size = CHKSIZE $2
 	then								\
 		echo "$@ size $$size > maximum size $$max_size" >&2;	\
 		exit 1 ;						\
-	fi;
+	fi
 
 # Check size of a file
 quiet_cmd_check_file_size = CHKFILESIZE $2
-- 
2.39.5




      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 " 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 ` [PATCH 3/5] kbuild: images: fix missing FORCE prerequisite Ahmad Fatoum
2024-12-02 12:44 ` [PATCH 4/5] kbuild: don't prelink if input file didn't change Ahmad Fatoum
2024-12-02 12:44 ` Ahmad Fatoum [this message]

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-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