freebsd-dev/contrib/bmake/unit-tests/directive-for-empty.exp
Simon J. Gerraty 954401e68e Update to bmake-20220724
Merge commit '308a28d6cd2e87028e535eabccb89a9dc2fd9515'
2022-07-26 09:09:32 -07:00

28 lines
1.1 KiB
Plaintext

make: "directive-for-empty.mk" line 21: 2
make: "directive-for-empty.mk" line 34: Missing argument for ".error"
make: "directive-for-empty.mk" line 34: Missing argument for ".error"
make: "directive-for-empty.mk" line 34: Missing argument for ".error"
For: end for 1
For: loop body:
# The identifier 'empty' can only be used in conditions such as .if, .ifdef or
# .elif. In other lines the string 'empty(' must be preserved.
CPPFLAGS+= -Dmessage="empty(i)"
# There may be whitespace between 'empty' and '('.
.if ! empty (i)
. error
.endif
# Even in conditions, the string 'empty(' is not always a function call, it
# can occur in a string literal as well.
.if "empty\(i)" != "empty(i)"
. error
.endif
# In comments like 'empty(i)', the text must be preserved as well.
#
# Conditions, including function calls to 'empty', can not only occur in
# condition directives, they can also occur in the modifier ':?', see
# varmod-ifelse.mk.
CPPFLAGS+= -Dmacro="${empty(i):?empty:not-empty}"
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1