[Top][All Lists]

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

[bug #49093] ifdef checks for non-empty value, not definition

From: Danek Duvall
Subject: [bug #49093] ifdef checks for non-empty value, not definition
Date: Thu, 15 Sep 2016 23:40:01 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; SunOS i86pc; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #3, bug #49093 (project make):

I'm not asking for behavioral change -- I figured that would have been a long
shot at best.  But I still feel like the docs are inconsistent, or at least
could be clarified a bit.

Specifically, the sentences "Note that 'ifdef' only tests whether a variable
has a value. It does not expand the variable to see if that value is
nonempty." are, to my mind, incorrect, and not consistent with the earlier
definition, or with the following examples.

In your first example here, FOO has a value, even if it's empty, so according
to those sentences, it should evaluate to true.  I don't know whether that
counts as "expansion", or whether "expansion" only matters when there's
another variable for indirection, as in the second example.

Perhaps something like "Note that 'ifdef' only tests the named variable for a
non-empty value, and does not further expand any variables it might
reference." in place of those two sentences.  I'm not positive that would have
told me what I needed to know, but I think it's a bit better than what's there

That said, I know the answer now, and this bug can be found if people search
for ifdef and gnu make, so if you're averse to the change, perhaps that's


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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