Subject: Re: Should make create $MAKEOBJDIR ?
To: David Laight <>
From: Luke Mewburn <>
List: tech-userlevel
Date: 03/19/2003 01:19:14
On Tue, Mar 18, 2003 at 02:01:47PM +0000, David Laight wrote:
  | > >I wondered if there were any reason why make shouldn't create
  | > >the object directory when MAKEOBJDIR is set in the environment.
  | > 
  | > Yes.  This would likely break far more than it fixes.  
  | OK have (yet another) random environment variable that causes make to
  | either:
  | 1) abort if MAKEOBJDIR is set and the directory doesn't exist
  | or:
  | 2) create the required directory.

Argh, more configuration knobs in the build system.  Evil!

Seriously though; there's already N different ways to support objdirs,
and adding Yet Another Config Knob just adds more crap we have to
support "down the track".

Your problem would most likely be solved if you used MAKEOBJDIRPREFIX
instead of MAKEOBJDIR.  Sure, the paths to the objdirs are longer, but
then you can do stuff like:
(in (t)csh) to access your newly built application :)

(Using MAKEOBJDIRPREFIX results in the full path to the source being
used in the objdir, whereas MAKEOBJDIR trims off the "NETBSDSRCDIR"
equivalent bits.  This also means you can't share MAKEOBJDIR amongst
multiple source trees, which you can do with MAKEOBJDIRPREFIX).