Subject: Re: some packages don't work well with MANZ unset...
To: NetBSD Packages Technical Discussion List <tech-pkg@netbsd.org>
From: I presume I need no introduction. <greywolf@starwolf.com>
List: tech-pkg
Date: 12/23/1998 15:32:52
Greg A. Woods sez:
/*
 * 
 *    #                              ###
 *   # #    #####    ####   #    #   ###
 *  #   #   #    #  #    #  #    #   ###
 * #     #  #    #  #       ######    #
 * #######  #####   #  ###  #    #
 * #     #  #   #   #    #  #    #   ###
 * #     #  #    #   ####   #    #   ###

I could not have said it better myself.

 * 
 * How much more misleading can one possibly get than to use variables in
 * so many different ways in one set of .mk files?  Are they flags?  Are
 * they variables?  How do you tell the difference?

The really misleading one happens to be MANZ, since _I_ understood
"undefined" to mean "not set to anything in particular" and not "never
even mentioned", especially when you read the comment.

[excerpt from /etc/mk.conf]:
MANZ=				# gzip manual pages at installation time
                                # Possible: defined, not defined
                                # Default: not defined
[end excerpt]

I wouldn't expect that MANZ would be set by default, yet there it was.
I got bitten by this as well.

This is _really_ shoddy, gang.  "Undefined" and "empty" should mean the
same thing, unless you can give a working, concrete example as to why
they should not.  This means that we should be using ".if !empty(VAR)"
and not ".ifdef(VAR)".

 * With what little I know about Berkeley Make's variables I don't see how
 * it's possible to undefine one if the default is "defined".

.undef (MANZ)


Happy Winter Solstice.  Late.


				--*greywolf;
--
System V any flavor: just say NO!