tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Environment settings not taken into account by (portable) bmake(1)?(!)

On Sat, 5 Nov 2016 22:34:13 +0000
David Holland <> wrote:

> you should *always* set CFLAGS and LDFLAGS (and CC
> and so on) explicitly and *never* rely on what make gives you by
> default, because historically Unix vendors have routinely shipped make
> with broken defaults

I can't let that advice pass unchallenged.  

Taking the last argument first, I'm not sure to what extent
"historically Unix vendors" matter anymore.  These days, if you're
compiling anything from source, you're compiling a lot of it.  If
you're running Solaris or AIX in 2016, and your CFLAGS is borked by
default, you've got bigger problems.  If you're running any other
proprietary Unix, statistically you don't exist.  

CFLAGS & friends exist to *inform* the build where to look and what to
do.  If you override them, you force the user to find some other way to
tell your build system (make or whatever) to
use /usr/local/include/foo/bar instead of the usual one.  

No autoconf magic can determine which of N competing versions of
installed libraries to use.  Ignoring user-defined settings, even when
well intentioned, only makes the user's job harder. 


Home | Main Index | Thread Index | Old Index