[Top][All Lists]

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

Re: GNU make troubleshooting

From: Dmitry Goncharov
Subject: Re: GNU make troubleshooting
Date: Sun, 16 Jul 2023 08:33:26 -0400

On Sat, Jul 15, 2023 at 5:27 PM Bruno Haible <bruno@clisp.org> wrote:
> I believe these two user goals are so different; they belong in different
> chapters.
i believe, a good approach to big debug output is to modify the
makefile to relieve make from doing redundant work.
Once make only does necessary minimal work only, the debug output is
also necessary and minimal.
In other words, i don't see a chapter on how to avoid big debug output
without optimizing the makefile.

> I believe that 80%-90% of the developers, when they see
> 1000 lines of debug/trace output, give up understanding it after 5 seconds
> and try alternative approaches. (This is based on observing the habits
> of my developer colleagues at work.)

i agree.

> > > Can the addition of 'makefile::;' be replaced by a make option or
> > > by some (sed-based?) postprocessing?
> >
> > There is no option.
> > You can grep away most of the matching lines with 'grep -v makefile'.
> Then it's useful to present this as a filter in the troubleshooting
> section.

i'd rather have the manual to teach how to modify the makefile to
relieve make from doing redundant work.
i am puzzled why you prefer working around with options and filters.
Are you thinking about a scenario where you cannot modify the makefile?
Another approach for the case when you cannot modify the makefile is this

$ cat makefile
all: hello
$ make -nd |wc
   1334    7530   63382
$ make -E $'.DEFAULT_GOAL:=all\nmakefile::;' -nd |wc
    732    4117   32947

regards, Dmitry

reply via email to

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