svn commit: r309332 - head

Dimitry Andric dim at FreeBSD.org
Wed Nov 30 19:06:48 UTC 2016


Author: dim
Date: Wed Nov 30 19:06:47 2016
New Revision: 309332
URL: https://svnweb.freebsd.org/changeset/base/309332

Log:
  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

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Wed Nov 30 18:34:40 2016	(r309331)
+++ head/Makefile.inc1	Wed Nov 30 19:06:47 2016	(r309332)
@@ -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


More information about the svn-src-head mailing list