mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
kbuild: refactor if_changed
'@set -e; $(echo-cmd) $(cmd_$(1)' can be replaced with '$(cmd)'. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
e5d289100d
commit
67126965ee
@ -251,8 +251,7 @@ any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
|
||||
|
||||
# Execute command if command has changed or prerequisite(s) are updated.
|
||||
if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
|
||||
@set -e; \
|
||||
$(echo-cmd) $(cmd_$(1)); \
|
||||
$(cmd); \
|
||||
printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:)
|
||||
|
||||
# Execute the command and also postprocess generated .d dependencies file.
|
||||
|
Loading…
Reference in New Issue
Block a user