Subject: Re: Problem in new toolchain builds (need comments)
To: James Chacon <>
From: Simon J. Gerraty <>
List: tech-toolchain
Date: 10/23/2001 15:40:26
>1. Put a complete set of's in place in the tree that eventually
>all recurse back to /usr/src/ Put all the USE_NEW_TOOLCHAIN and
>USETOOLS checks in there.

I was in favour of this a while back.  An alternative is to have a reliable
means of knowing where the top of the src tree is.  Which btw a top-level gives you:  SRCTOP=${.PARSEDIR}.

Now, I use a wrapper script for make that searches up the src tree until it
find a .sandbox-env file, and the directory where it find that is set as SB.
The SRCTOP is typically $SB/src - unless .sandbox-env says different.
With that availble it becomes pretty easy to set a whole raft of variables
that give you absolute and relative paths to top of src tree, top of obj tree
etc.  Including ${SRCTOP}/ also becomes pretty simple and cheap
to.  The wrapper is only involved in the kicking off of the build, so the
overhead is not too great - and of course you get the right result regardless
of where within the tree you start.

But if you don't want to go that route, then the's is the
best bet.  Note that you need to watchout for existing places in the tree
that have .include "../../" as the addition of new's
can change what gets .included (a bitch to debug btw).