On Tue, Sep 23, 2003 at 09:32:26AM -0500, D J Hawkey Jr wrote:
> Hi All.
>
> Something's been bugging me about 'make buildkernel ...' (or pro'lly more
> precisely, the docs): How do I re-make the kernel without first cleaning
> /usr/obj/...?
>
> After applying patches, I bump $BRANCH in /sys/conf/newvers.sh, and would
> like the running kernel to reflect the current patchlevel, but not at the
> expense of a complete rebuild. Something this trivial shouldn't get me in
> any trouble, kernel-wise, should it?
>
> Browsing Makefile.inc1, I see these defines:
> -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
> -DNOCLEAN do not clean at all
>
> What does 'cleandir' do that 'clean' doesn't? Remove directory trees?
> Anyway, is it as simple as:
> make buildkernel -DNOCLEAN KERNCONF=...
So long as you aren't changing the kernel configuration, then you can
probably use the 'old' build mechanism:
# cd /usr/src/sys/i386/conf
# config YOURKERNELCONFIGHERE
# cd ../../compile/YOURKERNELCONFIGHERE
# make depend
# make
# make install
However, this is only worth doing if you're going to be recompiling
the kernel a number of times, as the first time through it will
compile everything. Note that this won't put the object files
etc. under /usr/obj, although you might be able to achieve that by
creative use of the '-d destdir' flag to config(8).
Mind you, with modern machines cleaning or not before rebuilding is
becoming much less of an issue. It took less time to build a kernel
on my machine than it did to write this e-mail...
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
pgp00000.pgp
Description: PGP signature
