automake-ng
[Top][All Lists]
Advanced

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

Re: [Automake-NG] [PATCH 05/15] [ng] tests: Automake should let us appen


From: Stefano Lattarini
Subject: Re: [Automake-NG] [PATCH 05/15] [ng] tests: Automake should let us append to undefined variables (someday)
Date: Fri, 25 May 2012 16:20:54 +0200

On 05/25/2012 04:08 PM, Akim Demaille wrote:
> 
> Le 25 mai 2012 à 15:47, Stefano Lattarini a écrit :
> 
>> On 05/25/2012 03:26 PM, Akim Demaille wrote:
>>> The point was to prevent users from messing around with Automake
>>> variables.
>> One more good reason for Automake to stick to the 'AM_' namespace
>> consistently ;-)
> 
> Agreed.  Yet Automake uses PROGRAMS, SCRIPTS, SOURCES etc.  Many
> of them are tempting.
>
You mean Automake is using a variable names 'PROGRAMS' (without
any prefix like 'bin_' or 'noinst_') internally?  If yes, that is
a bug we should fix ASAP in Automake-NG.

>>> Then I am most probably doing silly things
>>> by appending to it (where I expected to just += the initial value).
>>>
>>> Whereas, had I initialized it, Automake would have complained from
>>> my using a variable it owns.
>>>
>> OK, got your point now; albeit to me it seems too much of a fringe
>> case to worry about, especially considered that the possibility to
>> append with '+=' to "undefined" variables has already been requested
>> in the past: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7671>
> 
> Well, that fact that more static checks can annoy is not
> new.  Yet I would not go back to K&R C.
>
Yes, but here is more like we are trying to put the static checks in
the preprocessor rather than in the compiler ;-)

The best long-term fix is probably add a new option/target/whatever
to GNU make to ensure *it* can error our on '+=' on undefined variables
and on redefinition of already-defined variable.

Any taker? *cough* (/me ducks and run).

> In the present case, what is rather a pity is that Automake
> did not initialize CLEANFILES.  And some others.  That do not
> start with AM_.
> 
>> More importantly, this discussion is mostly moot now, because we still
>> have not modified the Automake behaviour in this respect.  A thing that
>> could be useful, though, would be to enhance the commit message to
>> include your misgivings (and my reply to them) for future reference.
>> If you are inclined to do so, just post the new proposed commit message
>> here, so that I can amend my patch to include it.
> 
> You're the captain of the ship.  I just meant to tell you why
> we made her this way, but now she's yours :)
>
Ah, OK.  Thanks.

So let's just hope I can manage stay clear of icebergs ... ;-)

Stefano






reply via email to

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