make buildworld: build changes only?

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Jul 2 16:18:46 PDT 2004


On 2004-07-02 00:54, Geert Hendrickx <geert.hendrickx at ua.ac.be> wrote:
> Is it possible to rebuild these changes only?  I know I could cd to the
> directory of each changed file and do a make install there, but that is
> of course not quite practical.  I suppose this could be automated, since
> this was exactly the design principle of make: rebuild changed sources
> only.
>
> I know this might brake some dependencies in some cases, but I expect
> this to be rare.  I could still do a "full" buildworld when necessary.

Not if the 'partial build' produces a system that's not working good
enough to do a full buildworld though :(

If you know what you're doing, it's possible -- most of the time -- to
get away with something like this:

	$ cd /usr/src
	$ cvs -qR up -APd
	$ cd usr.bin/foo/
	$ make clean all install

But this isn't guaranteed to always work and it cannot be automated in
the way that you might be thinking of (i.e. run a couple of commands
and let everything magically fall into place).  The most automated way
of building stuff is practically a crontab script that runs:

	if [ ! -f /root/.noautobuildworld ]; then
		cvsup -g -L 2 -h cvsup-server.example.net /root/supfile
		cd /usr/src && \
		make buildworld
	fi

Output shall be mailed to root, since this is called from crontab, and
you'll be able to `touch /root/.noautobuildworld' to inhibit automatic
buildworlds and use the last known good build from /usr/obj to install
your system with `make installworld' as usual.

HTH,
Giorgos



More information about the freebsd-questions mailing list