Edgar Fuß | 30 Jul 2012 11:50
Picon
Favicon

Re: toolchain/46750: make oddity expanding variables assigned to with +=

The following reply was made to PR toolchain/46750; it has been noted by GNATS.

From: Edgar =?iso-8859-1?B?RnXf?= <ef <at> math.uni-bonn.de>
To: gnats-bugs <at> NetBSD.org
Cc: 
Subject: Re: toolchain/46750: make oddity expanding variables assigned to
 with +=
Date: Mon, 30 Jul 2012 11:47:27 +0200

 > The problem is that it's doing this even if the old value is the empty 
 > string, so you get a leading space.
 If we, for a moment, set aside how make internally handles lists (and 
 talk only about list elements not containing whitespace), the question is 
 what we expect "FOO=" to do.
 Either we expect it to set FOO to the empty list. Then, after "FOO+=foo", 
 the value should be "foo".
 Or we expect it to set FOO to a list containing an empty value. Then, 
 after "FOO+=foo", the value should indeed be " foo", but FOO:[1] should 
 return that empty value.

 > Relatedly, if you do
 Here, the question is whether we expect "FOO+=" to append an empty list 
 to FOO (e.g. don't change it) or whether we expext it to append an empty 
 value to the list.

 Probably that should be discussed on tech-toolchain and then made consistent.


Gmane