]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: Generate kwbimage.cfg with $(call cmd, ...)
authorPali Rohár <pali@kernel.org>
Wed, 12 Jan 2022 17:20:39 +0000 (18:20 +0100)
committerStefan Roese <sr@denx.de>
Fri, 14 Jan 2022 10:39:16 +0000 (11:39 +0100)
Usage of $(call cmd,...) is standard way to call other commands which
generate things.

It also has the advantage of printing build information in the form
  KWBCFG  arch/arm/mach-mvebu/kwbimage.cfg
if verbosity is disabled, and printing the build command otherwise.

Note that the '#' character needs to be escaped in Makefile when used as
value for make variable assignment.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/mach-mvebu/Makefile

index 0b2c57e573604b1c1576438ec15a873c4b785e80..8066d827b090c65fa20dcad1605673ebdfd8c10c 100644 (file)
@@ -59,10 +59,13 @@ KWB_REPLACE += SEC_FUSE_DUMP
 KWB_CFG_SEC_FUSE_DUMP = a38x
 endif
 
+quiet_cmd_kwbcfg = KWBCFG  $@
+cmd_kwbcfg = sed -ne '$(foreach V,$(KWB_REPLACE),s/^\#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
+       <$< >$(dir $@)$(@F)
+
 $(obj)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
                include/config/auto.conf
-       $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
-       <$< >$(dir $@)$(@F)
+       $(call cmd,kwbcfg)
 
 endif # CONFIG_SPL_BUILD
 obj-y  += gpio.o