Quoted variables don't appear to expand properly with some operators like :L at least. Both CURRENT and 8.1-RELEASE show the same behavior with FreeBSD's make, which is the conditional appears "malformed"... > cat Makefile.1 FOO?= bar .if "${FOO:L}" == "bar" .warning "match!" .else .warning "no match!" .endif > make -f Makefile.1 FOO=bar "Makefile.1", line 2: Malformed conditional ("${FOO:L}" == "bar") "Makefile.1", line 3: "match!" .. unquoting the variable works though without the malformed conditional noise... > cat Makefile.2 FOO?= bar .if ${FOO:L} == "bar" .warning "match!" .else .warning "no match!" .endif > make -f Makefile.2 FOO=bar "Makefile", line 3: warning: "match!" make: no target to make. bmake (NetBSD's make) doesn't have this malformed conditional issue... $ bmake -f Makefile.1 FOO=bar bmake: "Makefile.1" line 6: warning: "no match!" .. but the problem is that bmake doesn't correctly evaluate the expansion to be true when quoted or not quoted; that's a separate bug for the NetBSD folks though. How-To-Repeat: Repeat as shown above.
As was pointed out by me by someone else, bmake's :L modifier is not the same as FreeBSD's :L modifier. Thanks, -Garrett
Garrett Cooper <yaneurabeya@gmail.com> writes: >> cat Makefile.1 > FOO?= bar > .if "${FOO:L}" == "bar" > .warning "match!" > .else > .warning "no match!" > .endif >> make -f Makefile.1 FOO=bar > "Makefile.1", line 2: Malformed conditional ("${FOO:L}" == "bar") > "Makefile.1", line 3: "match!" > > .. unquoting the variable works though without the malformed > conditional noise... You can reduce example to .if "bar" == "bar" .warning "match!" .endif and make(1) would still produce $ make "Makefile", line 1: Malformed conditional ("bar" == "bar") "Makefile", line 2: warning: "match!" "Makefile", line 3: if-less endif It was fixed in bmake circa 2004 http://mail-index.netbsd.org/source-changes/2004/04/13/msg145128.html
Please close this PR once fmake is killed in base. Thanks! -Garrett
fmake is no longer being developed, so I'm closing this PR with "Feature Proposal Rejected" (it was the closest thing I could find to "WONTFIX").