If a variable has an empty value ifndef will enter the true branch.


> make EMPTY=0 all 
echo anything
anything
> make EMPTY=1 all 
makefile:12: *** variable is defined..  Stop.
> cat makefile
ifeq (1,${EMPTY})
  VAR=
else
  VAR=anything
endif

ifndef VAR
  VAR=${error variable is defined.}
endif

all:
        echo ${VAR}


This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to