diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-22 12:07:03 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-30 21:03:07 -0400 |
commit | 50bcca6ac417bfd18fa84d45eeaa4a30155fe3c8 (patch) | |
tree | 67cebe4bd459177d3f21acb007221b67115e9a63 /scripts/Kbuild.include | |
parent | 7ff4f0805eb5056662093b9886a819d2352e188b (diff) |
kbuild: rename arg-check to cmd-check
I prefer 'cmd-check' for consistency.
We have 'echo-cmd', 'cmd', 'cmd_and_fixdep', etc. in this file.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r-- | scripts/Kbuild.include | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 0ae07e83d393..ee3fec40111e 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -207,12 +207,12 @@ objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) | |||
207 | # See Documentation/kbuild/makefiles.txt for more info | 207 | # See Documentation/kbuild/makefiles.txt for more info |
208 | 208 | ||
209 | ifneq ($(KBUILD_NOCMDDEP),1) | 209 | ifneq ($(KBUILD_NOCMDDEP),1) |
210 | # Check if both arguments are the same including their order. Result is empty | 210 | # Check if both commands are the same including their order. Result is empty |
211 | # string if equal. User may override this check using make KBUILD_NOCMDDEP=1 | 211 | # string if equal. User may override this check using make KBUILD_NOCMDDEP=1 |
212 | arg-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ | 212 | cmd-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ |
213 | $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) | 213 | $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) |
214 | else | 214 | else |
215 | arg-check = $(if $(strip $(cmd_$@)),,1) | 215 | cmd-check = $(if $(strip $(cmd_$@)),,1) |
216 | endif | 216 | endif |
217 | 217 | ||
218 | # Replace >$< with >$$< to preserve $ when reloading the .cmd file | 218 | # Replace >$< with >$$< to preserve $ when reloading the .cmd file |
@@ -228,12 +228,12 @@ make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1)))) | |||
228 | any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) | 228 | any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) |
229 | 229 | ||
230 | # Execute command if command has changed or prerequisite(s) are updated. | 230 | # Execute command if command has changed or prerequisite(s) are updated. |
231 | if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ | 231 | if_changed = $(if $(strip $(any-prereq) $(cmd-check)), \ |
232 | $(cmd); \ | 232 | $(cmd); \ |
233 | printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) | 233 | printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) |
234 | 234 | ||
235 | # Execute the command and also postprocess generated .d dependencies file. | 235 | # Execute the command and also postprocess generated .d dependencies file. |
236 | if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)),$(cmd_and_fixdep),@:) | 236 | if_changed_dep = $(if $(strip $(any-prereq) $(cmd-check)),$(cmd_and_fixdep),@:) |
237 | 237 | ||
238 | cmd_and_fixdep = \ | 238 | cmd_and_fixdep = \ |
239 | $(cmd); \ | 239 | $(cmd); \ |
@@ -243,7 +243,7 @@ cmd_and_fixdep = \ | |||
243 | # Usage: $(call if_changed_rule,foo) | 243 | # Usage: $(call if_changed_rule,foo) |
244 | # Will check if $(cmd_foo) or any of the prerequisites changed, | 244 | # Will check if $(cmd_foo) or any of the prerequisites changed, |
245 | # and if so will execute $(rule_foo). | 245 | # and if so will execute $(rule_foo). |
246 | if_changed_rule = $(if $(strip $(any-prereq) $(arg-check)),$(rule_$(1)),@:) | 246 | if_changed_rule = $(if $(strip $(any-prereq) $(cmd-check)),$(rule_$(1)),@:) |
247 | 247 | ||
248 | ### | 248 | ### |
249 | # why - tell why a target got built | 249 | # why - tell why a target got built |
@@ -269,7 +269,7 @@ why = \ | |||
269 | $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ | 269 | $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ |
270 | $(if $(wildcard $@), \ | 270 | $(if $(wildcard $@), \ |
271 | $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ | 271 | $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ |
272 | $(if $(arg-check), \ | 272 | $(if $(cmd-check), \ |
273 | $(if $(cmd_$@),- due to command line change, \ | 273 | $(if $(cmd_$@),- due to command line change, \ |
274 | $(if $(filter $@, $(targets)), \ | 274 | $(if $(filter $@, $(targets)), \ |
275 | - due to missing .cmd file, \ | 275 | - due to missing .cmd file, \ |