Hello. I have such a makefile
##############################
var=
var+=
# var contains a space
all:
@$(if $(var),echo "direct: var is NOT empty",echo "direct: var
is empty")
##############################
On make 3.80 & 3.81, it both outputs
direct: var is NOT empty
However, make 3.81 doc ch 8.4 says
{quote}
|$(if condition,then-part[,else-part])|
...
The first argument, condition, first has all preceding and trailing
whitespace stripped, then is expanded. If it expands to any non-empty
string, then the condition is considered to be true. If it expands to
an empty string, the condition is considered to be false.
{quote}
Then why my makefile outputs "var is NOT empty" when $(var) would
definitely strip down to a null string? Can someone help explain this?