Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2024 15:05:15 -0500
From:      Kyle Evans <kevans@FreeBSD.org>
To:        freebsd-arch@freebsd.org
Subject:   Re: Default NO_CLEAN=yes in 15+
Message-ID:  <7a43f00d-b628-45ef-bfef-9685bbf999cf@FreeBSD.org>
In-Reply-To: <9bbb12ee-d5e0-4e9c-a832-bbfe5eea0ba6@FreeBSD.org>
References:  <9bbb12ee-d5e0-4e9c-a832-bbfe5eea0ba6@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/23/24 14:58, John Baldwin wrote:
> The buildworld and buildkernel targets include a "clean" step before 
> building
> objects dating back before my time to 'make world' (I haven't looked to see
> how far back it goes).  To permit incremental builds, this step can be 
> skipped
> via NO_CLEAN=yes.  This step is a bit unusual in build systems however.  
> Most
> build systems have separate commands for building vs cleaning (e.g. 
> 'make all'
> vs 'make clean') and over time FreeBSD's build system has gained dedicated
> clean targets as well (cleanworld and cleankernel).
>.

I note that "most build systems" includes our very own bsd.prog.mk, 
bsd.lib.mk, bsd.kmod.mk... extending some consistency to our higher 
level build orchestration seems fine.

> For myself, I always
> use NO_CLEAN=yes when building worlds and kernels.  If I need a clean build
> I use the dedicated clean targets (e.g. cleanworld) first.  In particular,
> cleanworld/cleankernel are far more efficient since they use a single
> recursive 'rm' whereas the "clean" step involves a full tree walk with
> nested make invocations of the 'cleandir' target.
> 
> A few years ago, Ed Maste added a MK_CLEAN option to src.opts.mk to as a
> WITH/WITHOUT knob for the "clean" step similar to NO_CLEAN=yes.  To 
> preserve
> existing behavior this knob currently defaults to on, but I know Ed's goal
> was to eventually flip the default so that NO_CLEAN builds would be the
> default.  I would like us to do that starting in 15.
> 

Yes, please.

> Further off, I would suggest that we remove the "clean" step outright,
> perhaps in 16.x.  Regardless, we will need to update documentation to
> prefer the clean targets over WITH_CLEAN=yes if our docs do not do this
> already.
> 

Yes, please.

Thanks,

Kyle Evans



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7a43f00d-b628-45ef-bfef-9685bbf999cf>