Subject: Re: Thoughts on getting rid of obj links
To: Greg Hudson <ghudson@mit.edu>
From: Simon J. Gerraty <sjg@frodo.dn.itg.telecom.com.au>
List: current-users
Date: 12/18/1995 14:39:30
> Comments?  Do people like this?  Do people go "ewww?"  Can people
> think of simpler ideas?  The lack of a good system for doing NetBSD
> builds out of a read-only source tree has caused some problems here.

I wrote a bunch of make macros some years ago that do much of this
sort of thing.  It relied on a "fixed" version of gmake where VPATH
worked "correctly".  You'd do something like:

cd build_top
mkptree.sh ../src

and it would replicate the src tree under build_top will all the
Makefiles suitablly edited such that srcdir=../../blah/blah.

I've used this lot to share a read only src tree between NetBSD,
SunOS, Solaris and HP-UX.

But I much prefer the BSD make and macros esp. with MACHINEOBJ=yes
(you get obj.${MACHINE} instead of just obj).

I've ported BSD make to each of the above platforms, and I think its
cool.

Although I've not used union mounts myself, I suspect that for NetBSD
that union mounts and MACHINEOBJ=yes would probably do the right thing
for NetBSD.

Of course astute readers will note that this does little for sharing
readonly source for projects other than NetBSD building...

Most of the changes I've made to usr/share/mk/* is to support projects
other than NetBSD building.


--sjg