diff options
author | Ed Maste <emaste@FreeBSD.org> | 2013-06-07 21:40:02 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2013-06-07 21:40:02 +0000 |
commit | 42f8c5b5800d41d7af6d1e3f55b4bbc72f10ea47 (patch) | |
tree | 1f627bceaf932e22013baa1c3a548108de20a7f1 /Makefile.inc1 | |
parent | 0a79452954b3a59b29b23151d33ef09b2096f4ec (diff) | |
download | src-test2-42f8c5b5800d41d7af6d1e3f55b4bbc72f10ea47.tar.gz src-test2-42f8c5b5800d41d7af6d1e3f55b4bbc72f10ea47.zip |
Add a new knob WITH_DEBUG_FILES to control the building of standalone
debug files for userland programs and libraries. The "-g" debug flag
is automatically applied when WITH_DEBUG_FILES is set.
The debug files are now named ${prog}.debug and ${shlib}.debug for
consistency with other systems and documentation. In addition they are
installed under /usr/lib/debug, to simplify the process of installing
them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the
base system place the standalone debug files in a .debug subdirectory.
GDB automatically searches both of these directories for standalone
debug files.
Thanks to everyone who contributed changes, review, and testing during
development.
Notes
Notes:
svn path=/head/; revision=251512
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index f09aa970a99a..d65dd31f87e8 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -470,6 +470,13 @@ _worldtmp: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} +.if ${MK_DEBUG_FILES} != "no" + # We could instead disable debug files for these build stages + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${WORLDTMP}/legacy/usr/lib >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${WORLDTMP}/usr/lib >/dev/null +.endif .if ${MK_BIND_LIBS} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null @@ -555,6 +562,10 @@ build32: -p ${LIB32TMP}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${LIB32TMP}/usr/lib >/dev/null +.endif mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} .for _t in obj includes @@ -779,6 +790,10 @@ distributeworld installworld: installcheck installcheck_UGID -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null +.endif .if defined(NO_ROOT) ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ sed -e 's#^\./#./${dist}/#' >> ${METALOG} |