Bug#620209: make: inconsistant description of ifdef directive behavior

2016-02-15 Thread Manoj Srivastava

>> Note that ifdef only tests whether a variable has a value. It does not
>> expand the variable to see if that value is nonempty. Consequently, tests
>> using ifdef return true for all definitions except those like foo =. To
>> test for an empty value, use ifeq ($(foo),).

>The paragraph that begins 'Note that ifdef only tests...' seems to be
>wrong in a suble way.  Although it is correct for recusively expanded
>variables, simply expanded variables that are assigned values that
>expand empty can still be undefined.

Actually, the assignment  in a simply expanded variable is
 atomic, so the RHS is expanded, and the variable is assigned an empty
 value, so this is, in my opinion, correct. In other words, We are not
 assigning something that will subsequently ge expanded to empty, we are
 assigning the empty value directly

manoj
-- 
If all the world's a stage, I want to operate the trap door. Paul Beatty
Manoj Srivastava    
4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20  05B6 CF48 9438 C577 9A1C


smime.p7s
Description: S/MIME cryptographic signature


Bug#620209: make: inconsistant description of ifdef directive behavior

2011-03-31 Thread Britton Leo Kerin
Package: make
Version: 3.81-5
Severity: normal


The manual says:

  ifdef variable-name

 The ifdef form takes the name of a variable as its argument, not a
 reference to a variable. The value of that variable has a non-empty value,
 the text-if-true is effective; otherwise, the text-if-false, if any, is
 effective. Variables that have never been defined have an empty value. The
 text variable-name is expanded, so it could be a variable or function that
 expands to the name of a variable. For example:

  bar = true
  foo = bar
  ifdef $(foo)
  frobozz = yes
  endif

  The variable reference $(foo) is expanded, yielding bar, which is
  considered to be the name of a variable. The variable bar is not
  expanded, but its value is examined to determine if it is non-empty.

  Note that ifdef only tests whether a variable has a value. It does not
  expand the variable to see if that value is nonempty. Consequently, tests
  using ifdef return true for all definitions except those like foo =. To
  test for an empty value, use ifeq ($(foo),). For example, 

The second sentence of the first paragraph has a grammar error, it lools like
it should read If the vale of that variable...

The paragraph that begins 'Note that ifdef only tests...' seems to be wrong in
a suble way.  Although it is correct for recusively expanded variables, simply
expanded variables that are assigned values that expand empty can still be
undefined.

-- System Information:
Debian Release: 5.0.8
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages make depends on:
ii  libc6   2.7-18lenny7 GNU C Library: Shared libraries

make recommends no packages.

Versions of packages make suggests:
pn  make-doc  none (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#620209: make: inconsistant description of ifdef directive behavior

2011-03-31 Thread Jonathan Nieder
reassign 620209 make-doc 3.81-5
tags 620209 + upstream
quit

Hi!

Britton Leo Kerin wrote:
[out of order for convenience]

 The manual says:

   ifdef variable-name

I assume you mean the manual shown with info make?

[...]
  The ifdef form takes the name of a variable as its argument, not a
  reference to a variable. The value of that variable has a non-empty 
 value,
  the text-if-true is effective; otherwise, the text-if-false, if any, is
  effective.
[...]
 The second sentence of the first paragraph has a grammar error, it lools like
 it should read If the vale of that variable...
[...]
   Note that ifdef only tests whether a variable has a value. It does not
   expand the variable to see if that value is nonempty. Consequently, 
 tests
   using ifdef return true for all definitions except those like foo =. To
   test for an empty value, use ifeq ($(foo),). For example, 


 The paragraph that begins 'Note that ifdef only tests...' seems to be wrong in
 a suble way.  Although it is correct for recusively expanded variables, simply
 expanded variables that are assigned values that expand empty can still be
 undefined.

Thanks for reporting; I'm passing your report on to the list of people
interested in the make-doc package that accompanies Debian.  I'd
suggest also reporting this to the upstream bug reporting address
shown by make --help.

Regards,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org