svn commit: r296353 - head/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Thu Mar 3 18:08:59 UTC 2016


Author: bdrewery
Date: Thu Mar  3 18:08:58 2016
New Revision: 296353
URL: https://svnweb.freebsd.org/changeset/base/296353

Log:
  DEBUG_FILES: Create the DEBUGFILEDIR if it doesn't exist on install.
  
  Currently the base.txz distribution does not get the BSD.debug.dist mtree
  extracted into it.  So if you start from that and then try to build a 3rd-party
  application outside of buildworld it will by-default try installing the
  debug files into a missing directory if they are being installed into /usr/lib.
  
  Check for the existence before forcing the directory to be created rather than
  the older way of running a shell command with test -d || mkdir -p always.
  
  Reported by:	HardenedBSD (https://github.com/HardenedBSD/secadm/issues/23)
  Sponsored by:	EMC / Isilon Storage Division
  Differential Revision:	https://reviews.freebsd.org/D5411

Modified:
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.prog.mk

Modified: head/share/mk/bsd.lib.mk
==============================================================================
--- head/share/mk/bsd.lib.mk	Thu Mar  3 17:46:38 2016	(r296352)
+++ head/share/mk/bsd.lib.mk	Thu Mar  3 18:08:58 2016	(r296353)
@@ -141,6 +141,8 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full
 DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR}
 .else
 DEBUGFILEDIR=${_SHLIBDIR}/.debug
+.endif
+.if !exists(${DESTDIR}${DEBUGFILEDIR})
 DEBUGMKDIR=
 .endif
 .else

Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk	Thu Mar  3 17:46:38 2016	(r296352)
+++ head/share/mk/bsd.prog.mk	Thu Mar  3 18:08:58 2016	(r296353)
@@ -63,6 +63,8 @@ PROG_FULL=${PROG}.full
 DEBUGFILEDIR=	${DEBUGDIR}${BINDIR}
 .else
 DEBUGFILEDIR?=	${BINDIR}/.debug
+.endif
+.if !exists(${DESTDIR}${DEBUGFILEDIR})
 DEBUGMKDIR=
 .endif
 .else


More information about the svn-src-all mailing list