Subject: yes/no vs. #defined
To: None <tech-pkg@netbsd.org>
From: Roland Illig <roland.illig@gmx.de>
List: tech-pkg
Date: 06/14/2004 16:38:55
Hi,
I have been wondering what the differences are between variables that
are defined using "# defined" and variables that have a value "yes/no".
That's what I found out:
* A yesno variable should be checked using empty(${VAR:M[Yy][Ee][Ss]).
* if it is undefined, a warning occurs.
It's because this code snippet looks inconsistent:
USE_BUILDLINK3= yes
USE_PKGLOCALEDIR= # defined
USE_X11= # defined
I would like to see a guideline for when to use "yes/no" and when
"#defined". Perhaps pkglint could then check for correct usage. Oh, by
the way, my patch for pkglint (25222) has not yet been submitted. Is it
too bad? ;)
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=25222
Roland