mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
kbuild: change if_changed_rule for multi-line recipe
Backport from kernel
commit 3a2429e1faf4 ("kbuild: change if_changed_rule for multi-line recipe")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
committed by
Tom Rini
parent
3679f24373
commit
daf8f5af4c
@@ -226,7 +226,7 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\
|
||||
echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';)
|
||||
|
||||
# printing commands
|
||||
cmd = @$(echo-cmd) $(cmd_$(1))
|
||||
cmd = @set -e; $(echo-cmd) $(cmd_$(1))
|
||||
|
||||
# Add $(obj)/ for paths that are not absolute
|
||||
objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
|
||||
@@ -268,21 +268,17 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
|
||||
printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:)
|
||||
|
||||
# Execute the command and also postprocess generated .d dependencies file.
|
||||
if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \
|
||||
@set -e; \
|
||||
$(cmd_and_fixdep), @:)
|
||||
if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)),$(cmd_and_fixdep),@:)
|
||||
|
||||
cmd_and_fixdep = \
|
||||
$(echo-cmd) $(cmd_$(1)); \
|
||||
$(cmd); \
|
||||
scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
|
||||
rm -f $(depfile)
|
||||
|
||||
# Usage: $(call if_changed_rule,foo)
|
||||
# Will check if $(cmd_foo) or any of the prerequisites changed,
|
||||
# and if so will execute $(rule_foo).
|
||||
if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \
|
||||
@set -e; \
|
||||
$(rule_$(1)), @:)
|
||||
if_changed_rule = $(if $(strip $(any-prereq) $(arg-check)),$(rule_$(1)),@:)
|
||||
|
||||
###
|
||||
# why - tell why a a target got build
|
||||
|
||||
@@ -236,11 +236,13 @@ endif # -record-mcount
|
||||
endif
|
||||
|
||||
define rule_cc_o_c
|
||||
$(call echo-cmd,checksrc) $(cmd_checksrc) \
|
||||
$(call cmd_and_fixdep,cc_o_c) \
|
||||
$(cmd_modversions) \
|
||||
$(cmd_objtool) \
|
||||
$(call echo-cmd,record_mcount) $(cmd_record_mcount)
|
||||
$(call cmd,checksrc)
|
||||
$(call cmd_and_fixdep,cc_o_c)
|
||||
$(call cmd,gen_ksymdeps)
|
||||
$(call cmd,checkdoc)
|
||||
$(call cmd,objtool)
|
||||
$(call cmd,modversions_c)
|
||||
$(call cmd,record_mcount)
|
||||
endef
|
||||
|
||||
define rule_as_o_S
|
||||
|
||||
Reference in New Issue
Block a user