Subject: Re: building for multiple archs from a read-only tree
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Matt Thomas <matt@3am-software.com>
List: current-users
Date: 03/29/2001 22:45:26
At 04:38 PM 3/29/2001 -0500, Greg A. Woods wrote:
>(just re-visiting old e-mail...)
>
>[ On Thursday, December 21, 2000 at 20:04:27 (-0600), Rob Healey wrote: ]
> > Subject: building for multiple archs from a read-only tree
> >
> >       The standard "make obj" process seems to need a writable source
> >       tree in order to work.
>
>True.  However with a *standard* "obj" link target, i.e. one that points
>to the same directory no matter what the value of $MACHINE, it's
>possible.

False.  If you use MAKEOBJDIRPREFIX, then you can use an read-only source
tree.  It's how I built the 1.5 distributions for arm32, macppc, and vax
out of a single read-only source tree.

The environment variable MAKEOBJDIRPREFIX needs to point to a directory in
which the object directories will created.  It *cannot* be in /etc/mk.conf
but must be in the environment.

You also need to point KERNOBJDIR to a directory outside of the tree as
well.

With those two set, you can do a make snapshot out of a read-only source
tree.
--
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message