Subject: Re: OBJ directories mishap... Whaa...?
To: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
From: James Chacon <jchacon@genuity.net>
List: current-users
Date: 08/23/2000 22:38:07
In mk/bsd.obj.mk:

        here=`${PAWD}`; subdir=$${here#${BSDSRCDIR}/}; \
        if test $$here != $$subdir ; then \

If your source tree you're building in isn't /usr/src and you haven't 
redefined BSDSRCDIR to point to the place you're at, it'll fall through here
and make real dirs and not symlinks.

Here's the file I source when I build:

BSDOBJDIR=/home/jmc/src/trunk/obj
BSDSRCDIR=/home/jmc/src/trunk/src
DESTDIR=/home/jmc/src/trunk/build
KERNOBJDIR=/home/jmc/src/trunk/obj/sys/arch/i386/compile
MKOBJDIRS=yes
RELEASEDIR=/home/jmc/src/trunk/release
UPDATE=1
export BSDOBJDIR
export BSDSRCDIR
export DESTDIR
export KERNOBJDIR
export MKOBJDIRS
export RELEASEDIR
export UPDATE
mkdir -p $KERNOBJDIR

I get all the proper behavior for obj dirs this way (and *nothing* ever shows
up in my src tree that wasn't checked in). MKOBJDIRS is handy to force
rebuilds as new source dirs you might not catch at times.

James

>
>
>--CdrF4e02JqNVZeln
>Content-Type: text/plain; charset=us-ascii
>Content-Disposition: inline
>Content-Transfer-Encoding: quoted-printable
>
>This is with netbsd-1-5. I haven't tried with -current yet.
>
>I've just recently updated my sources, and for some reason object
>directories are being created as actual directories in my source tree.
>This can't work, because I have multiple architectures building from
>the same tree. Using OBJMACHINE is insufficient, because I want the
>object stuff separated out entirely.
>
>What might be causing "make obj" to do this? I've got BSDOBJDIR set in
>/etc/mk.conf, but neither having it set in the environment nor nailing
>it down on the "make" command line helps. I haven't had time to track
>this further yet, but I assume the answer'll be immediately obvious to
>someone.
>
>FWIW, I remembered reading some stuff about sharesrc/share being different
>from basesrc/share or something, so I checked that out separately to no
>avail.
>
>Thanks in advance for clues.
>
>--=20
>    Mason Loring Bliss  mason@acheron.middleboro.ma.us  I m m a n e n t i z=
> e
>awake ? sleep : dream;  http://acheron.ne.mediaone.net  t h e E s c h a t o=
> n
>
>
>--CdrF4e02JqNVZeln
>Content-Type: application/pgp-signature
>Content-Disposition: inline
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.0.2 (NetBSD)
>Comment: For info see http://www.gnupg.org
>
>iD8DBQE5pCFAykMMY715wXIRAmyWAKDA9lNzmEsHtpBaz8LW3zPTOgzDNQCfYkQe
>vtXIPsV5NyoSDP9iTV4nFVk=
>=vRqO
>-----END PGP SIGNATURE-----
>
>--CdrF4e02JqNVZeln--
>
>
>
>