I came across a peculiar behavior while working with make.  If it is expected 
behavior, it would be worth documenting.  If it is not, a bug should be filed.

The following variable will never receive its default assignment:

# Set default for foo
export foo
foo ?= 5


It would appear that the export directive causes variables to be defined with 
an empty value, which renders the ?= assignment useless.  However, the 
following works fine:

# Set default for foo
export foo ?= 5

This may be common knowledge for some folks, but I struggled with it for a 
while.  I believe it would be worth noting in section 5.7.2 and/or 6.2 of the 
make manual.

Thanks -
Sean Mahnken
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to