From 6c2f1c4cb7aa053910c70b8b49c9a1643a309ef4 Mon Sep 17 00:00:00 2001 From: Garrett Cooper Date: Mon, 22 Apr 2013 17:15:51 -0700 Subject: [PATCH 1/3] Nuke chflags on LIB32TMP and WORLDTMP Sometimes these directories can be chflag'ed noschg, which means that the rm -rf will fail immediately; just unchflag the entire directory like cleanworld does today. Signed-off-by: Garrett Cooper --- Makefile.inc1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 4ce189c..27e0d1b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -422,10 +422,18 @@ _worldtmp: @echo ">>> Rebuilding the temporary build tree" @echo "--------------------------------------------------------------" .if !defined(NO_CLEAN) +.if exists(${WORLDTMP}/) + -rm -rf ${WORLDTMP} + -chflags -R 0 ${WORLDTMP} rm -rf ${WORLDTMP} +.endif .if defined(LIB32TMP) +.if exists(${LIB32TMP}/) + -rm -rf ${LIB32TMP} + -chflags -R 0 ${LIB32TMP} rm -rf ${LIB32TMP} .endif +.endif .else rm -rf ${WORLDTMP}/legacy/usr/include # XXX - These three can depend on any header file. -- 1.8.2