[PATCH 4/5] kbuild: don't prelink if input file didn't change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux