History

kbuild: rename any-prereq to newer-prereqs

GNU Make manual says: $? The names of all the prerequisites that are newer than the target, with spaces between them. To reflect this, rename any-prereq to newer-prereqs, which is clearer and more intuitive.

Masahiro Yamada committed 7 years ago

Commit eba19031 parent 2d3b1b81 file · +5 −5Browse files

Unified · Split

scripts/Kbuild.include+5−5
@@ -215,15 +215,15 @@ make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1)))) · 214 unmodified lines
215215 # but it does not work as expected when .SECONDARY is present. This seems a bug
216216 # of GNU Make.)
217217 # PHONY targets skipped in both cases.
218−any-prereq = $(filter-out $(PHONY),$?)
218+newer-prereqs = $(filter-out $(PHONY),$?)
219219
220220 # Execute command if command has changed or prerequisite(s) are updated.
221−if_changed = $(if $(any-prereq)$(cmd-check), \
221+if_changed = $(if $(newer-prereqs)$(cmd-check), \
222222 $(cmd); \
223223 printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:)
224224
225225 # Execute the command and also postprocess generated .d dependencies file.
226−if_changed_dep = $(if $(any-prereq)$(cmd-check),$(cmd_and_fixdep),@:)
226+if_changed_dep = $(if $(newer-prereqs)$(cmd-check),$(cmd_and_fixdep),@:)
227227
228228 cmd_and_fixdep = \
229229 $(cmd); \
@@ -233,7 +233,7 @@ cmd_and_fixdep = \ · 3 unmodified lines
233233 # Usage: $(call if_changed_rule,foo)
234234 # Will check if $(cmd_foo) or any of the prerequisites changed,
235235 # and if so will execute $(rule_foo).
236−if_changed_rule = $(if $(any-prereq)$(cmd-check),$(rule_$(1)),@:)
236+if_changed_rule = $(if $(newer-prereqs)$(cmd-check),$(rule_$(1)),@:)
237237
238238 ###
239239 # why - tell why a target got built
@@ -258,7 +258,7 @@ ifeq ($(KBUILD_VERBOSE),2) · 18 unmodified lines
258258 why = \
259259 $(if $(filter $@, $(PHONY)),- due to target is PHONY, \
260260 $(if $(wildcard $@), \
261− $(if $(any-prereq),- due to: $(any-prereq), \
261+ $(if $(newer-prereqs),- due to: $(newer-prereqs), \
262262 $(if $(cmd-check), \
263263 $(if $(cmd_$@),- due to command line change, \
264264 $(if $(filter $@, $(targets)), \