aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-22 12:07:04 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-30 21:03:15 -0400
commit93f31bbda43603da1e8af06667b45b410c6c897a (patch)
tree23a3b78650d2a98f5fbb1d605c2de378f2fa6e98 /scripts/Kbuild.include
parent50bcca6ac417bfd18fa84d45eeaa4a30155fe3c8 (diff)
kbuild: save $(strip ...) for calling any-prepreq
The string returned by $(filter-out ...) does not contain any leading or trailing spaces. So, only the space that matters is the one between $(filter-out $(PHONY),$?) and $(filter-out $(PHONY) $(wildcard $^),$^) By removing it from the code, we can save $(strip ...) evaluation. This refactoring is possible because $(any-prereq) is only passed to the first argument of $(if ...), so we are only interested in whether or not it is empty. This is also the prerequisite for the next commit. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index ee3fec40111e..6f9e88716ff4 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -225,7 +225,7 @@ make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))
225 225
226# Find any prerequisites that is newer than target or that does not exist. 226# Find any prerequisites that is newer than target or that does not exist.
227# PHONY targets skipped in both cases. 227# PHONY targets skipped in both cases.
228any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) 228any-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.
231if_changed = $(if $(strip $(any-prereq) $(cmd-check)), \ 231if_changed = $(if $(strip $(any-prereq) $(cmd-check)), \
@@ -268,7 +268,7 @@ ifeq ($(KBUILD_VERBOSE),2)
268why = \ 268why = \
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 $(any-prereq),- due to: $(any-prereq), \
272 $(if $(cmd-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)), \