From dd0c1c986d67e1fcf3673aa91eb9845a7f6c3f03 Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 16 Aug 2017 17:22:42 +0000 Subject: [PATCH] remove debug files in delete-old* when WITHOUT_DEBUG_FILES Reported by: brd Reviewed by: bdrewery, brd MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12044 --- tools/build/mk/OptionalObsoleteFiles.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 18a30e725a9ab..e497b8d553529 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1557,6 +1557,22 @@ OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .endif +.if ${MK_DEBUG_FILES} == no +.if exists(${DESTDIR}/usr/lib/debug) +DEBUG_DIRS!=find ${DESTDIR}/usr/lib/debug -mindepth 1 \ + -type d \! -path "${DESTDIR}/usr/lib/debug/boot/*" \ + | sed -e 's,^${DESTDIR}/,,'; echo +DEBUG_FILES!=find ${DESTDIR}/usr/lib/debug \ + \! -type d \! -path "${DESTDIR}/usr/lib/debug/boot/*" \! -name "lib*.so*" \ + | sed -e 's,^${DESTDIR}/,,'; echo +DEBUG_LIBS!=find ${DESTDIR}/usr/lib/debug \! -type d -name "lib*.so*" \ + | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${DEBUG_DIRS} +OLD_FILES+=${DEBUG_FILES} +OLD_LIBS+=${DEBUG_LIBS} +.endif +.endif + .if ${MK_DIALOG} == no OLD_FILES+=usr/bin/dialog OLD_FILES+=usr/bin/dpv