Subject: Re: BSDSRCDIR, was Re: mount*(8) linked as one binary ?
To: <>
From: Simon J. Gerraty <sjg@quick.com.au>
List: tech-userlevel
Date: 11/27/2000 10:02:57
>On 28 Oct 2000, Chris G. Demetriou wrote:
>> Frederick Bruckman <fb@enteract.com> writes:
>> > That begs the question of where the top of the build tree _is_, so
>> > you're asking to set BSDSRCDIR, or equivalent, in every Makefile in
>> > the tree.
>> 
>> Or in the Makefile.inc files, yes.  This is what a
>> relative-TOPDIR-like scheme is about.

>I see! It looks like someone's started to do this already -- see the
>top-level Makefile.inc. At this time, Makefile.local.inc seems to be

That would probably be me ;-)
With some of the changes I made to make and bsd.obj.mk you can set
MAKEOBJDIR='${.CURDIR:S,${ABSTOP},${OBJTOP},}'
where ABSTOP is the top of your src tree, and OBJTOP is the top of your
object tree, and you'll get a neat obj tree that parallels your src.
Eg.
ABSTOP=/work/NetBSD/current/src
OBJTOP=/work/NetBSD/current/obj

The current tree buils without needing Makefile.inc's in all the subdirs
of src - but for other reasons I've found it worth adding them.

--sjg