Update of bug #56206 (project make): Status: None => Not A Bug Open/Closed: Open => Closed
_______________________________________________________ Follow-up Comment #1: This behavior is correct. The confusion is because the ?= operator and the ifndef operator have different behaviors for variables which are defined to have an empty value. ifdef/ifndef test whether the expansion of the variable is the empty string or not: ifndef variable-name If the variable variable-name has an empty value, the text-if-true is effective; otherwise, the text-if-false, if any, is effective. However, the ?= operator tests whether the variable is actually defined or not, not whether it has an empty value: There is another assignment operator for variables, ‘?=’. This is called a conditional variable assignment operator, because it only has an effect if the variable is not yet defined. This statement: FOO ?= bar is exactly equivalent to this (see The origin Function): ifeq ($(origin FOO), undefined) FOO = bar endif Note that a variable set to an empty value is still defined, so ‘?=’ will not set that variable. -verbatim= _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56206> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make