bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion for make manual


From: Sean Mahnken
Subject: Suggestion for make manual
Date: Fri, 3 Jan 2014 21:00:13 +0000

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]