Subject: Re: putting more 'make' into 'make snapshot'
To: Todd Whitesel <toddpw@best.com>
From: Frederick Bruckman <fb@enteract.com>
List: tech-install
Date: 12/21/1999 07:15:02
On Tue, 21 Dec 1999, Todd Whitesel wrote:

> > > 1. Use 'make clean' (or snapclean) to reset the snapshot goo. I don't like
> > > 	the UPDATE=1 concept very much; IMHO it is a "knob", only acceptable
> > > 	in the context of something like 'make build' because you may to
> > > 	update share/mk before anything else will work. Even then I wish we
> > > 	would do something else instead, perhaps 'make newsrc cleandir build'
> > > 	so you are really saying what you mean. But I digress.
> > 
> > I don't see what's wrong with UPDATE. I feel it's dishonest somehow to
> > build and install a different system than the one you're running.
> 
> Huh? If I wanted to do that to myself, I'd always have DESTDIR set, instead
> of only when populating an empty tree as part of the snapshot procedure.

I don't follow you...

> Hmm, maybe I'm getting myself into trouble here because I expect it to
> be possible to do some kind of make clean, followed by as many cycles
> of "run make, fix bug, repeat" as it takes to get a full build.

Exactly. And then, when you do a "make release" with UPDATE, DESTDIR,
& RELEASEDIR all set, you're effectively staging and tarring up the
identical binaries that you're running. Making a clean build at that
point is unnecessary.
 
> Just what, exactly, is 'make build UPDATE=1' defined to do differently??

"make release UPDATE=..." keeps you from having to rebuild the system
that's already the way you want it. I think I would like a BUILD_DONE
flag even better, rather than INSTALL_DONE.

This is how I think a full release script should look:

cd /usr/src &&
make build EXPORTABLE_SYSTEM=1 &&
make release EXPORTABLE_SYSTEM=1 UPDATE=1 \
	DESTDIR=/var/tmp/release \
	RELEASEDIR=/usr/release/`uname -m` &&
#
make build &&
# The following requires a (proposed) change to src/etc/Makefile to 
# build _only_ the security set when EXPORTABLE_SYSTEM is not set.
make release UPDATE=1 \
	DESTDIR=/var/tmp/release \
	RELEASEDIR=/usr/release/`uname -m` &&
#
cd /usr/xsrc &&
make build &&
# The following requires a (proposed) change to xsrc/Makefile.
make release BUILD_DONE=1 \
	DESTDIR=/var/tmp/release \
	RELEASEDIR=/usr/release/`uname -m`