Subject: Re: sanitising make(1) variable overrides
To: None <>
From: Chris G. Demetriou <>
List: tech-userlevel
Date: 01/25/1999 18:28:50
Luke Mewburn <> writes:
> * 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.

It's a known bug that these work the way that they do.

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

don't forget that LDSTATIC is a tristate switch.

-static		compile everything statically
""		compile everything dynamically
not set		compile with the defaults (a mix of both)

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

That all is the way to go.

I'm pretty sure that a couple of years ago i started hacking things in
that direction, and maybe even gave somebody diffs... (i think they
might have been along with some diffs i sent to perry and/or others
re: support for automatically building debugging-symbol versions of
the libraries, as well.)

I doubt you'd find those diffs useful, but i mention it as a very
strong statement of "this is the right way to go."

Chris Demetriou - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.