[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%)
or
$(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?
Bruno
[1] https://www.gnu.org/software/make/manual/html_node/Eval-Function.html
[2]
https://sourceware.org/git/?p=glibc.git;a=blob;f=Makerules;h=018780c818cab0d4626e31308f013582114fca4f;hb=HEAD#l1043
- Re: GNU make troubleshooting, (continued)
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
Re: GNU make troubleshooting, Paul Smith, 2023/07/10
Re: GNU make troubleshooting, Jeffrey Walton, 2023/07/10