Subject: Re: sanitising make(1) variable overrides
To: Luke Mewburn <lukem@cs.rmit.edu.au>
From: Todd Vierling <tv@pobox.com>
List: tech-userlevel
Date: 01/26/1999 08:08:25
On Tue, 26 Jan 1999, Luke Mewburn wrote:

: * 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.

Because they use defined().  The logic could be changed, I suppose, and use
?= in the appropriate places ...

: * 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.

The reason for this is that you can set LDSTATIC= (nothing), which makes
everything, including /bin and /sbin, _dynamic_ (by turning off the
conditional LDSTATIC?=-static in the appropriate places).  So that probably
means it should have a different name from either LDSTATIC or STATIC.  :)

(Yeah, I've actually built an all-dynamic system to fit on a Really Small
disk.  It was a 20MB or so solid-state thingy.)

: * 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).

MANINSTALL=maninstall will do it for install time; however, it would still
nroff them in the tree.  sigh.

...

: * 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.

Or `0' or `1'?

These can, I suppose, be set with ?= in the appropriate .mk files so that
they have a value for the various checks.

There are some other variables which would need this handling:
  NOPICINSTALL (don't install _pic.a files)
  NOLINKLIB (don't build .a files unless that's all that you can do, and
    never install them)

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)