tech-userlevel archive

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

Re: regression/bug in /usr/bin/make



On Sat, 05 Sep 2009 20:22:39 +0300, Aleksey Cheusov writes:
>I think I've found a bug in make.

Yes, you may have.

>Makefile:
>    var = head
>    res = no
>
>    .for i in head:tail
>    .if !empty(var:M${i:C/:.*//})

.for is now more careful about delimiters and such within the value of
its iterator values.  The above expands as

.if !empty(var:M${:Uhead\:tail:C/:.*//})

and the following simpler makefile exhibits the same issue

.if !empty(var:M${:Uhead\:tail:C/:.*//})
res=yes
.endif

either way, make -dv reports

Applying :U to ""
Result of :U is "head"
Applying :t to "head"
make: Bad modifier `:tail' for 

the Result of :U should probably have been "head:tail"

Feel free to file a PR - you can assign it to me.

BTW, while bmake-20081111 does report "head:tail" for :U in the simpler
example, it then gets the rest wrong.


Home | Main Index | Thread Index | Old Index