diff options
author | dim <dim@FreeBSD.org> | 2016-12-06 07:33:49 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-12-06 07:33:49 +0000 |
commit | 63225a52dd62d80251d3f1e7acb8535c342e0415 (patch) | |
tree | 6e2897e91e36e721f26010ee328b27d0a854920b /Makefile.inc1 | |
parent | aeaef32114ac004f8f3a8f21096b00550cc220d8 (diff) | |
download | FreeBSD-src-63225a52dd62d80251d3f1e7acb8535c342e0415.zip FreeBSD-src-63225a52dd62d80251d3f1e7acb8535c342e0415.tar.gz |
MFC r309332:
Cleanup old debug dirs in delete-old-dirs target
Any .debug or .symbols files under /usr/lib/debug which correspond to
OLD_FILES entries in ObsoleteFiles.inc are also automatically cleaned up
by the delete-old target. Make this also apply to any OLD_DIRS entries.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8683
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index c148967..7cabd1e 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2345,6 +2345,11 @@ delete-old-dirs: .PHONY elif [ -L "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \ fi; \ + if [ -d "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \ + rmdir -v "${DESTDIR}${DEBUGDIR}/$${dir}" || true; \ + elif [ -L "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \ + echo "${DESTDIR}${DEBUGDIR}/$${dir} is a link, please remove everything manually."; \ + fi; \ done @echo ">>> Old directories removed" @@ -2359,6 +2364,11 @@ check-old-dirs: .PHONY elif [ -L "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \ fi; \ + if [ -d "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \ + echo "${DESTDIR}${DEBUGDIR}/$${dir}"; \ + elif [ -L "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \ + echo "${DESTDIR}${DEBUGDIR}/$${dir} is a link, please remove everything manually."; \ + fi; \ done delete-old: delete-old-files delete-old-dirs .PHONY |