[Top][All Lists]

[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: Mon, 10 Jul 2023 16:45:26 -0400
User-agent: Evolution 3.48.3 (by Flathub.org)

On Mon, 2023-07-10 at 16:34 -0400, Jeffrey Walton wrote:
> I would add GNU's make lacks minimal debug facilities.

I assume this is what Bruno means by his point #3: "Single-stepping or
tracing function execution".

> That's like peppering a program with printf's. I would like to
> understand why a statement was (or was not) evaluated, and if
> evaluated the result, but there is no option with the effect of
> Bash's 'set +x'.

I think I don't quite understand this.  Basically EVERY line in make is
always evaluated, unless it's inside an if-statement.  Makefiles are
not like shell scripts, where you can skip sections or return early
before some parts are parsed.  The entire makefile is parsed before any
rules are invoked.

Maybe you can explain more clearly what you want to know.

> I think trace is worthless. It does not help the folks writing
> makefiles. Or it has never helped me understand why a statement was
> (or was not) evaluated, or the result of the evaluation.

That's because that's not its purpose.  It's not trying to help
understand evaluation, it's trying to explain why a given recipe was
run, and which rule was used to run it.

reply via email to

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