summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-07-23 19:34:09 +0000
committeremaste <emaste@FreeBSD.org>2013-07-23 19:34:09 +0000
commit5cb590fc37a5c65062a909bd466e3e341f267f99 (patch)
treebefa2b601c8d3664cf68e974ece22fbafacb3fcc /Makefile.inc1
parent697ec4c8f3b97be3b8fb6d16411df658e1ee688b (diff)
downloadFreeBSD-src-5cb590fc37a5c65062a909bd466e3e341f267f99.zip
FreeBSD-src-5cb590fc37a5c65062a909bd466e3e341f267f99.tar.gz
Generate debug data release dist sets
If WITH_DEBUG_FILES is set the standalone debug data will be excluded from each ${dist}.txz and placed in a ${dist}.debug.txz. Submitted by: gjb Reviewed by: brooks
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc130
1 files changed, 29 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 87949fb..2099fa9 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -833,6 +833,18 @@ distributeworld installworld: installcheck installcheck_UGID
awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \
${DESTDIR}/${DISTDIR}/${dist}.meta
.endfor
+.if ${MK_DEBUG_FILES} != "no"
+. for dist in base ${EXTRA_DISTRIBUTIONS}
+ @# For each file that exists in this dist, print the corresponding
+ @# line from the METALOG. This relies on the fact that
+ @# a line containing only the filename will sort immediatly before
+ @# the relevant mtree line.
+ cd ${DESTDIR}/${DISTDIR}; \
+ find ./${dist}/usr/lib/debug | sort -u ${METALOG} - | \
+ awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \
+ ${DESTDIR}/${DISTDIR}/${dist}.debug.meta
+. endfor
+.endif
.endif
.endif
@@ -841,13 +853,29 @@ packageworld:
.if defined(NO_ROOT)
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \
+ --exclude usr/lib/debug \
@${DESTDIR}/${DISTDIR}/${dist}.meta
.else
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
- tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz .
+ tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \
+ --exclude usr/lib/debug .
.endif
.endfor
+.if ${MK_DEBUG_FILES} != "no"
+. for dist in base ${EXTRA_DISTRIBUTIONS}
+. if defined(NO_ROOT)
+ ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
+ tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.debug.txz \
+ @${DESTDIR}/${DISTDIR}/${dist}.debug.meta
+. else
+ ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
+ tar cvJfL ${DESTDIR}/${DISTDIR}/${dist}.debug.txz \
+ usr/lib/debug
+. endif
+. endfor
+.endif
+
#
# reinstall
#
OpenPOWER on IntegriCloud