Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2013 19:34:09 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253580 - head
Message-ID:  <201307231934.r6NJY9gU035202@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Jul 23 19:34:09 2013
New Revision: 253580
URL: http://svnweb.freebsd.org/changeset/base/253580

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

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Tue Jul 23 16:17:46 2013	(r253579)
+++ head/Makefile.inc1	Tue Jul 23 19:34:09 2013	(r253580)
@@ -833,6 +833,18 @@ distributeworld installworld: installche
 	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
 #



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307231934.r6NJY9gU035202>