summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2011-03-02 14:39:26 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2011-03-02 14:39:26 +0000
commit99ad39c822aa9bfa14167e101fce67e6d996dd42 (patch)
tree7614655486ed54841482c8143b6c735f775ce4b0 /Makefile.inc1
parent7b9758e3085cad9b8ebc7ab8d42f8a34947ecbe7 (diff)
downloadsrc-test2-99ad39c822aa9bfa14167e101fce67e6d996dd42.tar.gz
src-test2-99ad39c822aa9bfa14167e101fce67e6d996dd42.zip
Improve the distributeworld target in Makefile.inc1 and update the release
infrastructure to use it. make distributeworld can now be used without preparing its environment first and installs games into its distribution using the regular make distribute logic instead of post-processing with a script. Also add two new targets, packageworld and packagekernel, that tar up the results of distributeworld and distributekernel (also new), respectively.
Notes
Notes: svn path=/head/; revision=219177
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc146
1 files changed, 46 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index e30de3e4eaa5..4723d142bf48 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -631,6 +631,13 @@ ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
#
# Installs everything compiled by a 'buildworld'.
#
+
+# Non-base distributions produced by the base system
+EXTRA_DISTRIBUTIONS= doc games
+.if defined(LIB32TMP) && ${MK_LIB32} != "no"
+EXTRA_DISTRIBUTIONS+= lib32
+.endif
+
distributeworld installworld: installcheck
mkdir -p ${INSTALLTMP}
progs=$$(for prog in ${ITOOLS}; do \
@@ -653,8 +660,33 @@ distributeworld installworld: installcheck
done); \
cp $$libs $$progs ${INSTALLTMP}
cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
+.if make(distributeworld)
+.for dist in ${EXTRA_DISTRIBUTIONS}
+ -mkdir ${DESTDIR}/${DISTDIR}/${dist}
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
+ -p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+ -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null
+.endfor
+ -mkdir ${DESTDIR}/${DISTDIR}/base
+ ${_+_}cd ${.CURDIR}; ${IMAKE} distrib-dirs \
+ DESTDIR=${DESTDIR}/${DISTDIR}/base
+.endif
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
${IMAKEENV} rm -rf ${INSTALLTMP}
+.if make(distributeworld)
+.for dist in ${EXTRA_DISTRIBUTIONS}
+ find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete
+.endfor
+.endif
+
+packageworld:
+.for dist in base ${EXTRA_DISTRIBUTIONS}
+ ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
+ tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz .
+.endfor
#
# reinstall
@@ -840,6 +872,20 @@ reinstallkernel reinstallkernel.debug: installcheck
${CROSSENV} PATH=${TMPPATH} \
${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//}
+distributekernel distributekernel.debug:
+.if empty(INSTALLKERNEL)
+ @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
+ false
+.endif
+ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
+ ${CROSSENV} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \
+ DESTDIR=${DESTDIR}/${DISTDIR}/kernel \
+ ${.TARGET:S/distributekernel/install/}
+
+packagekernel:
+ ${_+_}cd ${DESTDIR}/${DISTDIR}/kernel; \
+ tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz .
+
#
# doxygen
#