[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #49093] ifdef checks for non-empty value, not definition
From: |
Paul D. Smith |
Subject: |
[bug #49093] ifdef checks for non-empty value, not definition |
Date: |
Wed, 14 Sep 2016 22:13:25 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 |
Update of bug #49093 (project make):
Item Group: Bug => Documentation
Triage Status: None => Small Effort
_______________________________________________________
Follow-up Comment #1:
What the doc is trying to say is that:
FOO =
ifdef FOO
$(info true)
endif
will not print true because FOO has no value.
However, this:
FOO =
BAR = $(FOO)
ifdef BAR
$(info true)
endif
_will_ print true. Even though if you expanded $(BAR) you'd get the empty
string, the variable BAR is not empty (it's set to $(FOO)) and so ifdef calls
it defined. Probably an example like this would help make the doc more
clear.
Yes, it's true that ifdef is badly named. It should be something like "ifset"
or whatever instead. However, it works as intended and so does the origin
function value "undefined"; they have had these inconsistent meanings for 20+
years now; they're not going to change.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49093>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/