diff options
author | Pali Rohár | 2022-01-12 18:20:39 +0100 |
---|---|---|
committer | Stefan Roese | 2022-01-14 11:39:16 +0100 |
commit | 6329d4402e06529f9c2aaa6d76a4869a20ed7afd (patch) | |
tree | a6cae1927793ffe2674c14f2dca76631e0785c6f /arch | |
parent | 3db9c417688f0f6f2239c52ca6f847f3db5ec23a (diff) |
arm: mvebu: Generate kwbimage.cfg with $(call cmd, ...)
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mvebu/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 0b2c57e5736..8066d827b09 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -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 |