11.5Srilligmake: directive-for-empty.mk:22: 2
21.1SrilligFor: end for 1
31.2SrilligFor: loop body with i = value:
41.1Srillig# The identifier 'empty' can only be used in conditions such as .if, .ifdef or
51.1Srillig# .elif.  In other lines the string 'empty(' must be preserved.
61.1SrilligCPPFLAGS+=	-Dmessage="empty(i)"
71.1Srillig# There may be whitespace between 'empty' and '('.
81.1Srillig.if ! empty (i)
91.1Srillig.  error
101.1Srillig.endif
111.1Srillig# Even in conditions, the string 'empty(' is not always a function call, it
121.1Srillig# can occur in a string literal as well.
131.1Srillig.if "empty\(i)" != "empty(i)"
141.1Srillig.  error
151.1Srillig.endif
161.1Srillig# In comments like 'empty(i)', the text must be preserved as well.
171.1Srillig#
181.1Srillig# Conditions, including function calls to 'empty', can not only occur in
191.1Srillig# condition directives, they can also occur in the modifier ':?', see
201.1Srillig# varmod-ifelse.mk.
211.1SrilligCPPFLAGS+=	-Dmacro="${empty(i):?empty:not-empty}"
221.4Srilligexit status 0
23