diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-22 19:07:04 +0300 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-07-01 04:03:15 +0300 |
commit | 93f31bbda43603da1e8af06667b45b410c6c897a (patch) | |
tree | 23a3b78650d2a98f5fbb1d605c2de378f2fa6e98 /scripts | |
parent | 50bcca6ac417bfd18fa84d45eeaa4a30155fe3c8 (diff) | |
download | linux-93f31bbda43603da1e8af06667b45b410c6c897a.tar.xz |
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')
-rw-r--r-- | scripts/Kbuild.include | 4 |
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)), \ |