diff --git a/Makefile.inc1 b/Makefile.inc1 index 2849cd35f54a..897732389836 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -782,6 +782,11 @@ EXTRA_DISTRIBUTIONS+= lib32 EXTRA_DISTRIBUTIONS+= tests .endif +DEBUG_DISTRIBUTIONS= +.if ${MK_DEBUG_FILES} != "no" +DEBUG_DISTRIBUTIONS+= base ${EXTRA_DISTRIBUTIONS:S,doc,,} +.endif + MTREE_MAGIC?= mtree 2.0 distributeworld installworld: _installcheck_world @@ -858,8 +863,7 @@ distributeworld installworld: _installcheck_world 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 dist in ${DEBUG_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 @@ -868,8 +872,7 @@ distributeworld installworld: _installcheck_world 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 +.endfor .endif .endif @@ -887,19 +890,17 @@ packageworld: .endif .endfor -.if ${MK_DEBUG_FILES} != "no" -. for dist in base ${EXTRA_DISTRIBUTIONS} -. if defined(NO_ROOT) +.for dist in ${DEBUG_DISTRIBUTIONS} +. if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.debug.txz \ + tar cvJf ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \ @${DESTDIR}/${DISTDIR}/${dist}.debug.meta -. else +. else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvJfL ${DESTDIR}/${DISTDIR}/${dist}.debug.txz \ + tar cvJfL ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \ usr/lib/debug -. endif -. endfor -.endif +. endif +.endfor # # reinstall diff --git a/release/Makefile b/release/Makefile index 2fdaba9cc91c..6b4517dc4377 100644 --- a/release/Makefile +++ b/release/Makefile @@ -155,10 +155,13 @@ system: packagesystem mkdir -p release cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ DESTDIR=${.OBJDIR}/release MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ - MK_PROFILE=no MK_SENDMAIL=no MK_TESTS=no MK_LIB32=no + MK_PROFILE=no MK_SENDMAIL=no MK_TESTS=no MK_LIB32=no \ + MK_DEBUG_FILES=no # Copy distfiles mkdir -p release/usr/freebsd-dist - cp *.txz MANIFEST release/usr/freebsd-dist + for dist in MANIFEST $$(ls *.txz | grep -v -- '-dbg'); \ + do cp $${dist} release/usr/freebsd-dist; \ + done # Copy documentation, if generated .if !defined(NODOC) cp reldoc/* release @@ -180,7 +183,7 @@ bootonly: packagesystem MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ MK_NCP=no MK_TOOLCHAIN=no MK_PROFILE=no \ MK_INSTALLIB=no MK_RESCUE=no MK_DICT=no \ - MK_KERNEL_SYMBOLS=no MK_TESTS=no + MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no # Copy manifest only (no distfiles) to get checksums mkdir -p bootonly/usr/freebsd-dist cp MANIFEST bootonly/usr/freebsd-dist @@ -200,10 +203,12 @@ dvd: mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ - MK_TESTS=no + MK_TESTS=no MK_DEBUG_FILES=no # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist - cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist + for dist in MANIFEST $$(ls *.txz | grep -v -- '-dbg'); \ + do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ + done # Copy documentation, if generated .if !defined(NODOC) cp reldoc/* ${.TARGET}