stupid question about compiling the kernel

Erik Trulsson ertr1013 at
Mon Jan 21 04:51:08 PST 2008

On Mon, Jan 21, 2008 at 12:09:46PM +0000, Pete French wrote:
> if I;ve chhanged one line of one file, how can I recompile without
> going back to the top and doing a 'make buildkernel' so I just recompile
> that one file ? It's getting a bit tedious to wait 40 minutes when I've
> only chnaged one line - is there a better way ?

Use 'make -DNO_CLEAN buildkernel' instead of 'make buildkernel'.
This way the build will not remove all the old object files first, but
will just recompile those files that need to be recompiled. (Works for
buildworld as well.)

Beware that there are a few, fairly rare, situations where it is actually
needed to clean the tree first before building.  If you run into problems
it is a good idea to skip the '-DNO_CLEAN' flag.

<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at

More information about the freebsd-stable mailing list