[Top][All Lists]
[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 15:47:56 +0200 |
On 05/25/2012 03:26 PM, Akim Demaille wrote:
>
> Le 25 mai 2012 à 13:38, Stefano Lattarini a écrit :
>
>> This is not the case yet, mostly for historical reason. However, allowing
>> that would mimic the behaviour of GNU make more closely (see the test case
>> 't/spy-var-append.sh'). Likely (and hopefully), it would also simplify
>> the implementation.
>
> The point was to prevent users from messing around with Automake
> variables.
>
> Say I use FOO, and run FOO += without initializing it. If this is
> an Automake variable, then all is well, and it does what I expect.
> if this is not an Automake variable, then I must initialize it,
> and this is then clearly a user variable.
>
> Suppose that Automake did not mandate that I initialize this
> variable to state it is mine. Imagine then that some new release
> of Automake uses FOO.
>
One more good reason for Automake to stick to the 'AM_' namespace
consistently ;-)
> 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>
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.
Regards,
Stefano
[Automake-NG] [PATCH 07/15] [ng] VarDef: store comments and values as a perl array, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 03/15] [ng] vars: get rid of VAR_SILENT type, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 08/15] [ng] vars: simplify logic for appending conditionally, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 06/15] [ng] refactor: support comments only for VarDef, not for ItemDef too, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 09/15] [ng] vars: keep track of conditionals in appended values and comments, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 11/15] [ng] refactor: change signature of 'define_variable()', Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 13/15] [ng] rename: define_pretty_variable -> define_cond_variable(), Stefano Lattarini, 2012/05/25