Subject: Re: two more bugs perry doesn't want to admit exists
To: Dieter Baron <>
From: James Chacon <>
List: tech-toolchain
Date: 11/25/2001 04:04:34
>  The problem occurs if obj root directory ( -O option)
>doesn't exist prior to starting, because $_SRC_TOP_OBJ_ is
>set in before running objdir (thus before it would be
>created) via ${PRINTOBJDIR} in $_SRC_TOP_ (the top of the source
>tree).  The value thus set is retained throughout the build.
>  I see three solutions:
>  1) The requirement that the top of the obj root directory (
>-O option) exists prior to running should be documented,
>  2) ensures it's existance, or
>  3) the logic in is changed.

Did this option. Kinda gross but basically force the top level source dir
to run a make obj before testing it's objdir value. Since on a top level
make gets included before anything else happsn this is pretty
much the only place you can bootstrap this.. For non obj dir builds this
will do nothing, and for the others it'll just create the top level obj dir.
This only runs once per top level make invocation so it's not a hit 
performance wise either.

This picks up the correct value for things as runs make with all
the right vars exported and anyone else running without will get
the same results (since they'd have to have MAKEOBJDIRPREFIX set in mk.conf
or their env to use it which was the problem case here anyways).