Subject: sanitising make(1) variable overrides
To: None <tech-userlevel@netbsd.org>
From: Luke Mewburn <lukem@cs.rmit.edu.au>
List: tech-userlevel
Date: 01/26/1999 12:49:33
an issue which has slightly annoyed me for a while is the mess that
is the method in which you control make(1)'s operation on the netbsd
source tree with variables. (something which i have contributed to,
i admit :)
issues:
* we have stuff like NOMAN, NOPIC, NOPROFILE, NOSHARE, etc. the problem
with these is that if you you have NOMAN=yes in /etc/mk.conf you can't
override it from the command line.
* i find LDSTATIC annoying because to link static programs i have to
do `make LDSTATIC=-static', rather than `make STATIC=' or whatever.
having the ability to define the flag to like statically is fine,
but requiring that to be explicitly defined is painful.
* a method in which to disable CATPAGES (NOCATPAGES? :) would be useful
(my cpu is fast enough to nroff on the fly for the times i read man
pages, and make build would be must faster without catpages).
i was about to add this requirement when i realised that i was annoyed
by the first issue above, and i didn't want to make things worse.
* the documentation for a lot of these controls is sparse at best.
i'm playing around with a couple of different ideas. one that might
work is something like:
* add MKMAN, MKPIC, MKPROFILE, MKSHARE which can be either `yes' or `no'.
this is so make can do
.if ($MKMAN != "yes")
or whatever, and know it always works. the *.mk files can check these
settings for sanity as well.
* set the above appropriately if NOMAN, NOPIC, ... is set at all,
and deprecate use of these in the tree. we still support them
anyway. maybe print a warning if they are used.
* add support for MKCATPAGES, MKSTATIC (which uses LDSTATIC iff necessary)
* fix the docco.
comments?