tech-toolchain archive

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

Re: bmake bug with expanding pattern macro replacements



On Sat, Apr 25, 2020 at 02:44:00PM +0200, Joerg Schilling wrote:
 > I discovered that bmake is silently changing the statement:
 > 
 > 	FOO= $(BAR:%foo=hallo)
 > 
 > into:
 > 
 > 	FOO= $(BAR:%foo=%hallo)
 > 
 > and this prevents it from being useful and it is in conflict with
 > the accepted POSIX behavior:
 > 
 > 	https://www.austingroupbugs.net/view.php?id=519#c1206

BSD make is not POSIX make (this has come up before) and in general
the archaic sysv substitution behavior isn't useful anyway; in BSD
make you should be using the S modifier, or C if you want regexps.

I notice that you have only taken eight and a half years to mention
this to us after discussing it in the POSIX issue tracker.

I guess it's a bug. I suppose maybe in late 2028 someone will get
around to fixing it.


(Also, to answer the other question, it is documented in the
description of :foo=bar, and it behaves as documented, though
admittedly it isn't very clear.)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index