help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug a make Makefile containing many Makefile scripts


From: Paul Smith
Subject: Re: How to debug a make Makefile containing many Makefile scripts
Date: Wed, 18 Nov 2020 09:48:19 -0500
User-agent: Evolution 3.36.4-0ubuntu1

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

[Prev in Thread] Current Thread [Next in Thread]