On Wed, 2020-11-18 at 17:27 +0700, Budi wrote:
> How to debug a make Makefile containing many Makefile scripts
> invocations, to trace where a variable/identifier name is actually
> declared/defined with debug log of all tracked ways to finding that,
> when that variable is being used at RHS

As mentioned yesterday you can use the -p option to get make to print
its database.

This will show all variable assignments (that are in effect at the end
of the makefile) and where they were defined.

It's just a start because it doesn't show you how the value was
obtained, but it's a starting point.

You can also investigate the remake tool; I haven't used it but others
have reported it's very useful:

http://bashdb.sourceforge.net/remake/


Reply via email to