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
This commit is contained in:
Dimitry Andric 2016-11-30 19:06:47 +00:00
parent dc521a5840
commit 26e287836b

View File

@ -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