Subject: Re: Building after DESTDIR
To: Frederick Bruckman <>
From: Simon Burge <>
List: current-users
Date: 03/22/2000 13:17:55
Frederick Bruckman wrote:

> On Tue, 21 Mar 2000, J. Buck Caldwell wrote:
> > So the other day, I decided to update a system that netboots from one of
> > my servers, using a differnet system (same arch, vax) to build. So I go
> > into /usr/src, mount the root of the target's filesystem in /mnt, and do
> > 'make DESTDIR=/mnt'. All went well, and the other system was updated.
> > However, now whenever I try to build for the original system, I get
> > error messages telling me that it doesn't know how to build
> > /mnt/usr/include/something or other. It's like the DESTDIR stuck. I
> > tried 'make clean' from /usr/src, redid 'make obj', and did 'make'
> > again, and it's still looking for includes in /mnt. What am I missing?
> Look in the ".depends" files to see why make is still looking in DESTDIR.
> "make cleandir" will get rid of them. Actually "make build" should DTRT,
> by doing a "make cleandir" first.

"make build" will also do things like set up the empty directories
before trying to put things in them - new ones do crop up from time
to time, and the

	(cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)

bit of "make build" makes sure all the necessary directories exist.
Note that theres also other things that get done by "make release"
that you may need to do.  Try:

	cd /usr/src/etc
	make -n INSTALL_DONE=1 release DESTDIR=/mnt RELEASEDIR=/foo

to see what would happen.