summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-11-30 19:06:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-11-30 19:06:47 +0000
commit26e287836b13fdb777857a47fe48f504d77d9696 (patch)
tree8fbdaed4f92de0db935102ee29f56253c045283f /Makefile.inc1
parentdc521a5840ab4f32b33ec5ec79e44b6e6029c3d3 (diff)
downloadsrc-test2-26e287836b13fdb777857a47fe48f504d77d9696.tar.gz
src-test2-26e287836b13fdb777857a47fe48f504d77d9696.zip
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 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D8683
Notes
Notes: svn path=/head/; revision=309332
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc110
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 878e6ce01deb..c3308228212d 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2404,6 +2404,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"
@@ -2418,6 +2423,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