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.
Showing the changes to scripts/Kbuild.include (1 of 1 file). Show all
Unified · Split
| @@ -215,15 +215,15 @@ make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1)))) · 214 unmodified lines | ||
| 215 | 215 | # but it does not work as expected when .SECONDARY is present. This seems a bug |
| 216 | 216 | # of GNU Make.) |
| 217 | 217 | # PHONY targets skipped in both cases. |
| 218 | −any-prereq = $(filter-out $(PHONY),$?) | |
| 218 | +newer-prereqs = $(filter-out $(PHONY),$?) | |
| 219 | 219 | |
| 220 | 220 | # 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), \ | |
| 222 | 222 | $(cmd); \ |
| 223 | 223 | printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) |
| 224 | 224 | |
| 225 | 225 | # 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),@:) | |
| 227 | 227 | |
| 228 | 228 | cmd_and_fixdep = \ |
| 229 | 229 | $(cmd); \ |
| @@ -233,7 +233,7 @@ cmd_and_fixdep = \ · 3 unmodified lines | ||
| 233 | 233 | # Usage: $(call if_changed_rule,foo) |
| 234 | 234 | # Will check if $(cmd_foo) or any of the prerequisites changed, |
| 235 | 235 | # 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)),@:) | |
| 237 | 237 | |
| 238 | 238 | ### |
| 239 | 239 | # why - tell why a target got built |
| @@ -258,7 +258,7 @@ ifeq ($(KBUILD_VERBOSE),2) · 18 unmodified lines | ||
| 258 | 258 | why = \ |
| 259 | 259 | $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ |
| 260 | 260 | $(if $(wildcard $@), \ |
| 261 | − $(if $(any-prereq),- due to: $(any-prereq), \ | |
| 261 | + $(if $(newer-prereqs),- due to: $(newer-prereqs), \ | |
| 262 | 262 | $(if $(cmd-check), \ |
| 263 | 263 | $(if $(cmd_$@),- due to command line change, \ |
| 264 | 264 | $(if $(filter $@, $(targets)), \ |