Subject: putting more 'make' into 'make snapshot'
To: None <tech-install@netbsd.org>
From: Todd Whitesel <toddpw@best.com>
List: tech-install
Date: 12/20/1999 04:09:35
Some background: I have managed to successfully build sources checked out
with -D "19991209 UTC" on i386, arm32, sparc, alpha, and (soon) sun3.
I am now trying to use 'make snapshot' on each host as it finishes.

The results:

i386 completed perfectly after I dealt with some fixable bugs (mostly in
the file lists for the distribution sets). The bugfixes were all MI and
were copied around. Patch coming soon.

arm32 completed perfectly first time, based on the fixes from i386.

alpha completed perfectly first time (ditto), but the machine (a multia)
came down with some kind of Multia Disease the next time I halted it (to
reboot with an MFS as /tmp, a very innocent reason). Unfortunately the
RELEASEDIR is still only on that machine, and is trapped until I can fix it.

sparc keeps crashing with a watchdog reset while trying to run runlist.sh
in distrib/miniroot.  Unfortunately, due to the current design of make
snapshot, I've been having all kinds of trouble trying to isolate a command
line that reproduces the problem quickly.

The root of my troubles is what I'd say is the only thing wrong with
'make snapshot' as it currently stands: it is really a script written using
make, when it should be a proper makefile with targets and dependencies that
represent real buildable things -- even if those buildable things have to be
dummy files created by 'touch' in some cases.

So I'd like to propose a few changes, and yes I'm volunteering to do the
work. If I don't hear serious objections by the time the sun3 finishes
(probably another few days, actually) then I'll start whacking and post
the diffs.

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.

2. Migrate more of the phony targets to depend on real buildable things
	when a clear output target is produced (like a kernel, or a boot
	file, or a disk image). Most (all?) places we currently use .for
	to expand out multiple commands in one rule, could just as easily
	be used to expand out multiple rules with the same command, and
	declare the additional dependencies needed to tell make what to do.

For now I don't plan to disturb the mtree/install stuff in any way, because
INSTALL_DONE=1 makes it go quite fast, so I'd rather leave it be.

Todd Whitesel
toddpw @ best.com