[Top][All Lists]

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

Re: makefile rules

From: Bruno Haible
Subject: Re: makefile rules
Date: Fri, 24 Dec 2021 12:49:42 +0100

Paul Eggert wrote:
>    SED_HEADER_BEGIN = -n \
>     -e 1h \
>     -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! *,w $@-t' \
>     -e 1g
>     -e 'w $@-t'
> (and we can put comments near this explaining 'sed' to the uninitiated :-).

Yes, these comments are what makes the difference between "halfway
understandable" and "completely unintelligible".

> Typically I use 'make V=1' or 'make --trace' or even 'strace -f make' to 
> debug problems like that, and something like that is needed anyway 
> regardless of where the AM_V_GEN appears in the recipe.
> ...
> It's not merely a micro-optimization; it can make debugging easier. I 
> recently went through the exercise of using 'strace -f make' to debug a 
> 'make' session that went awry. When it's easy to cut down on the number 
> of fork+exec calls (as is the case here), it'll make these sessions easier.

That's a valid point I can accept.


reply via email to

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