From 123ba50fdcaece75f98b75e6154ff15da77fc656 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Sun, 20 Nov 2011 19:05:32 +0000 Subject: [PATCH] Add a note to src/Makefile that explains that 'rm' runs twice because the second invocation only needs to operate on files with the immutable flag set. Submitted by: arundel (via private email) (original version) Discussed on: -toolchain@ MFC after: 3 days --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 61e678bd975..52f35d2facd 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,10 @@ buildworld: upgrade_checks # files with chflags set, so this unsets them and tries the 'rm' a # second time. There are situations where this target will be cleaning # some directories via more than one method, but that duplication is -# needed to correctly handle all the possible situations. +# needed to correctly handle all the possible situations. Removing all +# files without the immutable flag set in the first 'rm' instance saves +# time, because 'chflags' will need to operate on fewer files (with the +# immutable flag set) afterwards. # BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} cleanworld: