[PATCH 3/5] kbuild: images: fix missing FORCE prerequisite

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

 



With the recent changes updating fixdep, we now get warnings when we
miss the FORCE prerequisite:

  images/Makefile:151: FORCE prerequisite is missing

Fix this by adding the missing FORCE and using if_changed as intended.
While at it, we also make the output a little less verbose, so the
SHIPPED/DELETE output is omitted:

  SHIPPED images/barebox-nxp-imx8mm-evk.img
  SHIPPED images/barebox-prt-prt8mm.img
  DELETE  images/barebox-tqma93xx.img
  images built:
  barebox-nxp-imx8mm-evk.img
  barebox-prt-prt8mm.img
  ** barebox-tqma93xx.img skipped due to missing firmware **

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 images/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/images/Makefile b/images/Makefile
index f781ecb59ccb..5ce563a426ab 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -144,11 +144,13 @@ $(obj)/barebox.z: $(obj)/../barebox.bin FORCE
 
 missing_fw = $(strip $(wildcard $(obj)/$(FILE_$(@F)).missing-firmware $(basename $(obj)/$(FILE_$(@F))).missing-firmware))
 
+quiet_cmd_report_missing_fw = # no message as we collect info for later
+      cmd_report_missing_fw = $(if $2,cat $2 >$@.missing-firmware;$(cmd_delete),rm -f $@.missing-firmware;$(cmd_shipped))
+
 .SECONDEXPANSION:
-$(obj)/%.img: $(obj)/$$(FILE_$$(@F))
+$(obj)/%.img: $(obj)/$$(FILE_$$(@F)) FORCE
 	$(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi
-	$(Q)$(if $(missing_fw),cat $(missing_fw) >$@.missing-firmware,rm -f $@.missing-firmware)
-	$(call if_changed,$(if $(missing_fw),delete,shipped))
+	$(call if_changed,report_missing_fw,$(missing_fw))
 
 board = $(srctree)/arch/$(SRCARCH)/boards
 objboard = $(objtree)/arch/$(SRCARCH)/boards
-- 
2.39.5





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

  Powered by Linux