aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-23 01:07:04 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-07-01 10:03:15 +0900
commit93f31bbda43603da1e8af06667b45b410c6c897a (patch)
tree23a3b78650d2a98f5fbb1d605c2de378f2fa6e98 /scripts/Kbuild.include
parentkbuild: rename arg-check to cmd-check (diff)
downloadlinux-dev-93f31bbda43603da1e8af06667b45b410c6c897a.tar.xz
linux-dev-93f31bbda43603da1e8af06667b45b410c6c897a.zip
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))))
# Find any prerequisites that is newer than target or that does not exist.
# PHONY targets skipped in both cases.
-any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
+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) $(cmd-check)), \
@@ -268,7 +268,7 @@ ifeq ($(KBUILD_VERBOSE),2)
why = \
$(if $(filter $@, $(PHONY)),- due to target is PHONY, \
$(if $(wildcard $@), \
- $(if $(strip $(any-prereq)),- due to: $(any-prereq), \
+ $(if $(any-prereq),- due to: $(any-prereq), \
$(if $(cmd-check), \
$(if $(cmd_$@),- due to command line change, \
$(if $(filter $@, $(targets)), \