For debugging purposes, when there are many make file inclusions, it's useful to print the full path of the makefile where a particular variable in the current makefile was first defined. Is there a way to do that?
Just run make -p
. Make will print its internal database including all targets and variables that were seen along with the filename and linenumber where they were set.