[Top][All Lists]

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

Re: GNU make troubleshooting

From: Bruno Haible
Subject: Re: GNU make troubleshooting
Date: Mon, 10 Jul 2023 21:41:24 +0200

Paul Smith wrote:
> Showing the "macroexpanded make sources" is difficult because make
> doesn't just expand an entire line then parse it.  Makefile syntax is
> context-sensitive so you can't know how or if to expand parts of a line
> until you've already expanded other parts.  Of course make could keep
> track of this for generating this kind of output.

If no perfect solution to this problem is possible, how about
implementing a simple approximation first, and then improve it based
on user feedback?

Because how is a GNU make user supposed to understand a Makefile and
the expansion of things like

   $(1): $$($(1)_OBJS) $$($(1)_LIBS:%=-l%)


   $(objpfx)$o$($o-version): $(objpfx)$o; $$(make-link)

if 'make' does not help them? [1]

> > 3) Single-stepping or tracing function execution.
> Tracing is possible although if we just enable tracing for all variable
> expansion you'll get a TON of output.  Maybe the user could ask to
> trace expansion of certain things only.
> I'm not interested in implementing an "interactive" mode for single-
> stepping GNU Make.  Maybe someone else wants to do it but my suspicion
> is that the code changes needed would be massively disruptive.

That sounds like a discussion among GNU make contributors could maybe
bring up alternative implementation ideas, that are not so disruptive?


[1] https://www.gnu.org/software/make/manual/html_node/Eval-Function.html

reply via email to

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