tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make: empty expansion if mixing round and curly braces
On Tue, May 07, 2019 at 04:58:38PM +0200, Edgar Fu? wrote:
> I just again starred at a mis-behaving Makefile to notice that (b)make
> silently expands a variable to nothing if you mix normal and curly braces,
> i.e. $(var} or ${var). This is extremly painful to spot.
It's a "feature":
------
BRACE=}
VAR$(BRACE)=plop
foo:
echo $(VAR})
------
% make
echo plop
plop
%
I'm not sure what make thinks the variable name is if you leave off
the close-paren entirely, but I'm sure it's *something* and if you can
figure out what you can give that variable a value... at least if you
can load all the characters needed into other variables, which for
some characters is challenging.
This sort of nonsense should be prohibited, really...
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index