Date: Tue, 23 Jul 2024 23:46:01 +0200 From: Tomek CEDRO <tomek@cedro.info> To: John Baldwin <jhb@freebsd.org> Cc: arch@freebsd.org Subject: Re: Default NO_CLEAN=yes in 15+ Message-ID: <CAFYkXj=fLSg2p99gPkWM2aZuiwdhy7NMm7E5=yO0Fdq6sTzOSQ@mail.gmail.com> 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 Tue, Jul 23, 2024 at 9:58=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrot= e: > > The buildworld and buildkernel targets include a "clean" step before buil= ding > objects dating back before my time to 'make world' (I haven't looked to s= ee > how far back it goes). To permit incremental builds, this step can be sk= ipped > via NO_CLEAN=3Dyes. 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 dedicate= d > clean targets as well (cleanworld and cleankernel). For myself, I always > use NO_CLEAN=3Dyes when building worlds and kernels. If I need a clean b= uild > 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=3Dyes. To pre= serve > existing behavior this knob currently defaults to on, but I know Ed's goa= l > 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. > > 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=3Dyes if our docs do not do this > already. > > -- > John Baldwin +1 :-) --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYkXj=fLSg2p99gPkWM2aZuiwdhy7NMm7E5=yO0Fdq6sTzOSQ>