bug-make
[Top][All Lists]
Advanced

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

Re: Incorrect += handling?


From: Noel Yap
Subject: Re: Incorrect += handling?
Date: Fri, 01 Apr 2005 13:41:46 -0500
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

Well, at least it's consistent with:

FOO := foo
FOO +=
all: ; @echo '"$(FOO)"'

Having said that, I suppose it would it would be nice for it not to add the 
space for situations like:

FOO := foo
FOO += $(BAR)

in which BAR isn't defined.

Noel

address@hidden wrote:

I just realized this, which I think might be a bug:

  FOO := foo
  FOO +=#nothing here
  all: ; @echo '"$(FOO)"'

This prints:

  $ make
  "foo "

with a space, not:

  "foo"

which is what I'd expect.  Seems like the += adds the space character
even if the value being added is empty.

That doesn't seem like desirable behavior to me.  Of course I can easily
fix this myself, I'm just wondering if anyone thinks this behavior is
correct and shouldn't be changed.  The manual says only:

 > [...] adds the text [...] to it (preceded by a single space).

Which doesn't directly address the situation where there is no text.





reply via email to

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