Author: dim
Date: Tue Dec  6 07:33:49 2016
New Revision: 309605
URL: https://svnweb.freebsd.org/changeset/base/309605

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

Modified:
  stable/10/Makefile.inc1
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/Makefile.inc1
  stable/9/Makefile.inc1   (contents, props changed)
Directory Properties:
  stable/11/   (props changed)
  stable/9/   (props changed)

Modified: stable/10/Makefile.inc1
==============================================================================
--- stable/10/Makefile.inc1     Tue Dec  6 06:15:28 2016        (r309604)
+++ stable/10/Makefile.inc1     Tue Dec  6 07:33:49 2016        (r309605)
@@ -2028,6 +2028,11 @@ delete-old-dirs:
                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"
 
@@ -2042,6 +2047,11 @@ check-old-dirs:
                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
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to