[PATCH v2 4/5] images: don't prelink if input file didn't change
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Dec 12 00:30:32 PST 2024
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 at 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
More information about the barebox
mailing list