Subject: Re: mk.conf and build.sh
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 07/07/2004 10:15:59
On Wed, 7 Jul 2004, Patrick Welche wrote:

> On Wed, Jul 07, 2004 at 09:00:31AM -0500, Frederick Bruckman wrote:
>> On Wed, 7 Jul 2004, Patrick Welche wrote:
>>
>> You can't just never have object directories -- having objects in the
>> source tree will interfere with subsequent "cvs update"'s. You should
>> either use "-M", or "-O", or take the default value for "-O".
>
> I have all the object directories I need - hardly anything changed =>
> I was hoping that setting MKOBJDIRS=no in /etc/mk.conf would be honoured.
> As I pointed out, using -o instead works. Are you really telling me:
>
>  Anything you set in mk.conf is completely ignored when you run build.sh

No, more like "it's liable to be". MKOBJDIRS is one of the items 
that's specifically overriden. Moreover, some of the settings, such as 
MAKEOBJDIRPREFIX and TOOLDIR, *can't* be set in ${MAKECONF}, but only 
on the command line or the environment.

What many of the developers prefer to do (myself included), is to keep 
a tiny build.sh wrapper script in the top-level, that just calls 
"./build.sh" with predetermined arguments (plus "${*}", so you can add 
arguments as needed). This is much cleaner than trying to wrestle with 
various settings in ${MAKECONF} and the environment. I still do not 
put "-o" or "-u" in the wrapper - if I meant to use "-o", but forget, 
all that's lost is time, while if I were to forget to turn on obj dirs 
that were set off by default, it would make a mess of the source tree.

Frederick