[PATCH 5/5] kbuild: images: don't compute size if input file didn't change
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Dec 2 04:44:04 PST 2024
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 at 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
More information about the barebox
mailing list