From 1ae1311d9c614a58b2c0ebcb8361aae943381e89 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 24 Jul 2017 23:32:46 +0000 Subject: [PATCH] NO_CLEAN: Utilize delete-old to remove old orphaned libraries/headers in WORLDTMP. This prevents situations with -DNO_CLEAN from finding stale headers or libraries in places that no longer exist or have moved. It avoids the need to remove all of WORLDTMP by reusing what we already know is obsolete. MFC after: 1 month Sponsored by: Dell EMC Isilon --- Makefile.inc1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index cb3737b0267c..d26cd6559add 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -761,6 +761,13 @@ _worldtmp: .PHONY rm -rf ${LIBCOMPATTMP} .endif .else + ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ + delete-old delete-old-libs +.if defined(LIBCOMPAT) + ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ + DESTDIR=${LIBCOMPATTMP} \ + delete-old delete-old-libs +.endif rm -rf ${WORLDTMP}/legacy/usr/include .if ${USING_SYSTEM_COMPILER} == "yes" .for cc in cc c++