Date: Tue, 25 Jul 2023 00:41:33 +0200 From: Yuri <yuri@aetern.org> To: hackers@freebsd.org Subject: make: empty() does not seem to work for loop variables Message-ID: <6194cbf1-0466-7155-353d-0cd3c2ae74c6@aetern.org>
next in thread | raw e-mail | index | archive | help
Given the Makefile below, I get the following output:
---
$ make
make: "/home/yuri/tmp/Makefile" line 3: warning: check0
make: "/home/yuri/tmp/Makefile" line 11: warning: check2
---
Makefile:
---
FOO= bar
.if !empty(FOO:Mbar)
.warning check0
.endif
.for i in foo bar baz
.if !empty(i:Mbar)
.warning check1
.endif
.if ${i:Mbar} != ""
.warning check2
.endif
.endfor
all:
---
So it looks like empty() does not work when applied to loop variable?
Or am I missing something here?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6194cbf1-0466-7155-353d-0cd3c2ae74c6>
