Is there a command line way in make to find out which of the prerequisites of a target is not updated?
i am using make gnu make templates to define the make rules per target;
Templates are like macros that write rules, they are explained here https://www.gnu.org/software/make/manual/html_node/Eval-Function.html
this feature is useful when you have a make system that includes a core makefile to generate all rules per project type; if it says to do a shared library then it writes the rules to compile a shared library; etc. for other types of targets.
in this example: if you add SHOW_RULES=1 to the make command line it also shows the text of the rules that are generated by the PROGRAM_target_setup_template ; along with generating the rules themselves (with eval).
# this one defines the target for real
$(foreach prog, $(TARGETS), $(eval $(call PROGRAM_target_setup_template,$(prog))))
ifneq "$(SHOW_RULES)" ""
$(foreach prog, $(TARGETS), $(info $(call PROGRAM_target_setup_template,$(prog))))
endif
More about my make files here: http://mosermichael.github.io/cstuff/all/projects/2011/06/17/make-system.html