Subject: re: Sparc 5 newbie stuff
To: None <port-sparc@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 01/26/2002 14:53:17
[ On Saturday, January 26, 2002 at 11:19:49 (+1100), matthew green wrote: ]
> Subject: re: Sparc 5 newbie stuff 
>
> i have /usr/src NFS or nullfs mounted read-only.  i set MAKEOBJDIRPREFIX
> to ``/var/obj.${MACHINE}''.  this means that when i do a sparc build,
> objects end up in /var/obj.sparc/$cwd, etc.  MAKEOBJDIRPREFIX is only
> settable in the environment as it is handled *before* the makefile is
> read.  there is one caveat:  you'll have to run "make obj" before hand
> or "make cleandir" will barf somewhere...

You can achieve the same (with the same caveat) without having to mess
with settings in your environment by simply using /etc/mk.conf settings
like these (I think they'll still work with the most recent build
infrastructure in -current, though I've not tested them yet):

# The location of generated objects (may be a symlink)
#
# One should standardise on something like /var/NetBSD-obj, which
# can a symlink to the correct object directory for the machine (and
# thus making it *very* easy to switch objdirs for the same ${MACHINE}
# by switching /var/NetBSD-obj to some new place).
#
# Standardisation here also allows for easy creation of read-only
# source media (so long as you do not use the most useless OBJMACHINE).
#
BSDOBJDIR=      /var/NetBSD-obj

# If defined appends ".${MACHINE}" to ${BSDOBJDIR}
#
# This might be useful if you are doing cross-builds and don't want to
# change BSDOBJDIR for every target machine type
#
#USR_OBJMACHINE=        # define


-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>