bug-make
[Top][All Lists]
Advanced

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

Re: [bug #46995] Within 'define' newline is treated as non whitespace


From: Brian Vandenberg
Subject: Re: [bug #46995] Within 'define' newline is treated as non whitespace
Date: Tue, 15 Mar 2016 09:22:11 -0600

So I understand that the problem actually is that foreach adds whitespace into
variable name.

$(foreach var , $(LIST), do something with $(var ))

while in contrast for example 'call' knows to strip whitespace from a var name
so this:

$(call var ,$(ARG))
will actually invoke $(var) and not $(var ).

Yes, that's the jist of it.
 
Don't think I can change the bug topic.
Is that a known issue with an already open bug?
 
I don't know of one, but this is probably sufficient.  I can't think of a valid situation where someone would want leading/trailing whitespace as part of a variable name, so it's probably safe to just call strip( gmk_expand( argv[0] ) ) in $(foreach) and have done with it.  It would still allow the temporary variable to use whitespace between non-whitespace characters, and that seems like the most obscure case that should be supported.

-brian

reply via email to

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