make: empty() does not seem to work for loop variables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Jul 2023 22:41:33 UTC
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?