Subject: building with OBJDIR
To: None <>
From: NetBSD Mailing list <>
List: current-users
Date: 01/07/2000 16:34:08
OK, I give.

Could someone help me set up obj directories outside of the source tree?

By default, "make obj" embeds them in the source tree. 
Setting BSDOBJDIR and/or SRCOBJDIR effects no change to this regardless of
the MAKEOBJDIR setting.
Setting MAKEOBJDIR works correctly (e.g. MAKEOBJDIR=obj.vax).

I want to use /usr/obj as the location for obj files.  The sources
are NFS mounted, and the traffic is unnecessary for the obj's.

What am I missing here?  The simple existance of /usr/obj triggering
its use is what I'm accustomed to elsewhere.

Per mk/bsd.README (for easy reference):

>BSDOBJDIR       The real path to the system 'obj' tree, so that 'make obj'
>                 will work correctly. [/usr/obj]
>make(1) looks for the existance of a subdirectory (or a symlink to a
>directory) of the source directory into which built targets should be
>placed.  If an environment variable named MAKEOBJDIR is set, make(1)
>uses its value as the name of the object directory; failing that, make
>first looks for a subdirectory named "obj.${MACHINE}", and if that
>doesn't exist, it looks for "obj".
>Object directories are not created automatically by make(1) if they
>don't exist; you need to run a separate "make obj".  (This will happen
>during a top-level build if "MKOBJDIRS" is set to a value other than
>"no").  When the source directory is a subdirectory of ${BSDSRCDIR},
>object directories are created in a separate object directory tree,
>and a symlink to the object directory in that tree is created in the
>source directory.
>Several variables used by <> control exactly what
>directories and links get created during a "make obj":
>MAKEOBJDIR      If set, this is the component name of the object
>                directory.
>OBJMACHINE      If this is set but MAKEOBJDIR is not set, creates
>                object directories or links named "obj.${MACHINE}";
>                otherwise, just creates ones named "obj".
>USR_OBJMACHINE  If set, and the current directory is a subdirectory of
>                ${BSDSRCDIR}, create object directory in the
>                corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
>                otherwise, create it in the corresponding subdirectory
>                of ${BSDOBJDIR}

Thanks and stuff,
Scott G. Akmentins-Taylor     InterNet:
MRY Systems	
    (Skots Gregorijs Akmentins-Teilors -- just call me "Skots")
		----- Labak miris neka sarkans -----