Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jul 2024 00:31:23 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        John Baldwin <jhb@freebsd.org>, freebsd-arch <freebsd-arch@freebsd.org>
Subject:   RE: Default NO_CLEAN=yes in 15+
Message-ID:  <2BB28579-7C7B-4268-B3C6-BD8E11233CE7@yahoo.com>
References:  <2BB28579-7C7B-4268-B3C6-BD8E11233CE7.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin <jhb_at_FreeBSD.org> wrote on
Date: Tue, 23 Jul 2024 19:58:13 UTC :

> 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=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 =
dedicated
> 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 =
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.
>=20
> 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 =
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.
>=20
> 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.

I use META_MODE and do not explicitly control NO_CLEAN. Any implications
for META_MODE for this change?

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2BB28579-7C7B-4268-B3C6-BD8E11233CE7>