bug-make
[Top][All Lists]
Advanced

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

Re: GNU make troubleshooting


From: Paul Smith
Subject: Re: GNU make troubleshooting
Date: Tue, 29 Aug 2023 12:56:32 -0400
User-agent: Evolution 3.48.4 (by Flathub.org)

On Tue, 2023-08-29 at 09:44 -0400, David Boyce wrote:
> - I find it interesting that there's no mention of -n which seems
> like a bog-standard, POSIX-compliant, debugging method. It's also
> another way of getting around @. Simplistic but worth mentioning
> IMHO.

I rarely use -n, personally.  Also it can change the behavior of the
makefile, sometimes, if things are not built (or are considered built
when they really wouldn't be without -n).

But I should mention it; maybe it's a "just me" thing.

> - I wonder why there's so much emphasis on $(info ...) since
> $(warning ...) will do the same job and also provide file:line so I
> prefer it for debugging purposes.


warning prints to stderr, not stdout, and if you're trying to use it to
examine the behavior of eval in particular you need to understand that
the output is prefixed with content that WON'T be seen by eval.

The filename/linenumber in the output is often superfluous, since you
obviously know where you added the debugging (although I guess if you
added lots and lots of them, or maybe if you're trying to see where
something is expanded, it can be helpful).

But, it is worth mentioning.

> - In terms of "why does make insist on rebuilding this target", which
> is among the most common problems, ISTM that --debug=why or --trace
> is a simpler option than any messing with '@'. It cuts right to the
> chase and tells you what make is thinking.

Yes I realized that the other day (see previous emails) and I've
reworked the docs to completely remove all mention of mucking with @
prefixes, in preference to using --trace.

> - In an extreme case a user might want to try strace.
> 
> - There's the old "Ask Mr Make" columns by John Graham-Cumming
> 
> - You may not want to get into listing third-party tools

I don't think I want to put things of that level to the manual.

But, maybe there's another good place to collect things like that.

-- 
Paul D. Smith <psmith@gnu.org>            Find some GNU make tips at:
https://www.gnu.org                       http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist



reply via email to

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