Subject: Re: MAKEOBJDIR not honored?
To: Steven M. Bellovin <smb@research.att.com>
From: Simon J. Gerraty <sjg@crufty.net>
List: current-users
Date: 07/05/2003 00:30:49
>>DL> On Tue, Jun 24, 2003 at 11:19:45AM -0400, Steve Bellovin wrote:
>>DL> > Following the recent discussion about rebuilding the system, I
>>DL> > added the following lines to /etc/mk.conf:
>>DL> >
>>DL> > #ifndef BSD_PKG_MK
>>DL> > MAKEOBJDIR=/usr/obj
>>DL> > DESTDIR=/usr/netbsd
>>DL> > #endif
and it didn't work. MAKEOBJ* are processed _before_ any makefiles
(including sys.mk, mk.conf etc) are read. Thus it needs to come
from the environment. That how it has always worked. Its also
why a wrapper like build.sh can make it work.
A while ago, Todd added support for a .OBJDIR target so you could put:
.OBJDIR: ${MAKEOBJDIR}
in mk.conf and make(1) will reset its notion of .OBJDIR etc.
I've only played with it since my builds at work etc use a wrapper
to ensure a properly conditioned environment anyway, so the current
behavior has never seemed a problem.
So, .OBJDIR does work, but I can't say if there are any corner cases
that might bite.
--sjg