From owner-svn-src-all@FreeBSD.ORG Sun Mar 13 15:08:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8EE6106564A; Sun, 13 Mar 2011 15:08:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6BCC8FC13; Sun, 13 Mar 2011 15:08:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2DF86Nj058216; Sun, 13 Mar 2011 15:08:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2DF86TX058213; Sun, 13 Mar 2011 15:08:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103131508.p2DF86TX058213@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 13 Mar 2011 15:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219610 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 15:08:06 -0000 Author: nwhitehorn Date: Sun Mar 13 15:08:06 2011 New Revision: 219610 URL: http://svn.freebsd.org/changeset/base/219610 Log: Connect the full doc build (Handbook, etc.) to the build. This is not built if no doc checkout is found. Modified: head/release/Makefile.bsdinstall head/release/generate-release.sh Modified: head/release/Makefile.bsdinstall ============================================================================== --- head/release/Makefile.bsdinstall Sun Mar 13 14:58:02 2011 (r219609) +++ head/release/Makefile.bsdinstall Sun Mar 13 15:08:06 2011 (r219610) @@ -11,6 +11,7 @@ # WORLDDIR: location of src tree -- must have built world and default kernel # (by default, the directory above this one) # PORTSDIR: location of ports tree to distribute (default: /usr/ports) +# DOCDIR: location of doc tree (default: /usr/doc) # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation @@ -19,6 +20,7 @@ WORLDDIR?= ${.CURDIR}/.. PORTSDIR?= /usr/ports +DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 TARGET_ARCH?= ${MACHINE_ARCH} @@ -30,6 +32,13 @@ TARGET?= ${TARGET_ARCH} IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} DISTDIR= ${.OBJDIR}/dist +.if !exists(${DOCDIR}) +NODOC= true +.endif +.if !exists(${PORTSDIR}) +NOPORTS= true +.endif + EXTRA_PACKAGES= .if !defined(NOPORTS) EXTRA_PACKAGES+= ports.txz @@ -55,7 +64,14 @@ base.txz: -mkdir ${DISTDIR} cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${DISTDIR} # Set up mergemaster root database - sh ${.CURDIR}/scripts/mm-mtree.sh -F "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${DISTDIR}/base" + sh ${.CURDIR}/scripts/mm-mtree.sh -F \ + "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${DISTDIR}/base" +# Merge handbook, etc. from doc tree into src tree doc distribution +.if !defined(NODOC) + cd ${DOCDIR} && ${IMAKE} all install \ + DOCDIR=${DISTDIR}/doc/usr/share/doc 'FORMATS=html html-split txt' \ + INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES +.endif cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${DISTDIR} mv ${DISTDIR}/*.txz ${.OBJDIR} @@ -67,15 +83,19 @@ kernel.txz: src.txz: -mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src - cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn --exclude CVS usr/src + cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn \ + --exclude CVS usr/src ports.txz: -mkdir -p ${DISTDIR}/usr ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports - cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz --exclude usr/ports/distfiles --exclude usr/ports/packages --exclude 'usr/ports/INDEX*' --exclude work usr/ports + cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \ + --exclude usr/ports/distfiles --exclude usr/ports/packages \ + --exclude 'usr/ports/INDEX*' --exclude work usr/ports reldoc: - cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc + cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \ + INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc -mkdir ${.OBJDIR}/reldoc .for i in hardware readme relnotes errata ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.txt \ @@ -83,7 +103,7 @@ reldoc: ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.html \ ${.OBJDIR}/reldoc/${i:U}.HTM .endfor - @cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css ${.OBJDIR}/reldoc + cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css ${.OBJDIR}/reldoc system: packagesystem # Install system Modified: head/release/generate-release.sh ============================================================================== --- head/release/generate-release.sh Sun Mar 13 14:58:02 2011 (r219609) +++ head/release/generate-release.sh Sun Mar 13 15:08:06 2011 (r219610) @@ -1,14 +1,14 @@ #!/bin/sh # generate-release.sh: check out source trees, and build release components with -# totally clean, fresh trees +# totally clean, fresh trees. # # Usage: generate-release.sh svn-branch scratch-dir # # Environment variables: -# CVSUP_HOST: Host of a cvsup server to obtain the ports tree. Must be set -# to include ports. -# CVSUP_TAG: CVS tag for ports (HEAD by default) +# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation +# trees. Must be set to include ports and documentation. +# CVSUP_TAG: CVS tag for ports and documentation (HEAD by default) # MAKE_FLAGS: optional flags to pass to make (e.g. -j) # # Note: Since this requires a chroot, release cross-builds will not work! @@ -19,7 +19,7 @@ mkdir -p $2/usr/src svn co svn://svn.freebsd.org/base/$1 $2/usr/src || exit 1 if [ ! -z $CVSUP_HOST ]; then - cat > $2/ports-supfile << EOF + cat > $2/docports-supfile << EOF *default host=$CVSUP_HOST *default base=/var/db *default prefix=/usr @@ -27,9 +27,10 @@ if [ ! -z $CVSUP_HOST ]; then *default delete use-rel-suffix *default compress ports-all + doc-all EOF else - RELEASE_FLAGS=-DNOPORTS + RELEASE_FLAGS="-DNOPORTS -DNODOC" fi cd $2/usr/src @@ -39,8 +40,15 @@ mount -t devfs devfs $2/dev if [ ! -z $CVSUP_HOST ]; then cp /etc/resolv.conf $2/etc/resolv.conf - chroot $2 /usr/bin/csup /ports-supfile || exit 1 + + # Checkout ports and doc trees + #chroot $2 /usr/bin/csup /docports-supfile || exit 1 + + # Build ports to build the docs, then build the docs + chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' || exit 1 + chroot $2 /bin/sh -c "cd /usr/doc && make $MAKE_FLAGS 'FORMATS=html html-split txt' URLS_ABSOLUTE=YES" || exit 1 fi + chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1 mkdir $2/R chroot $2 /bin/sh -c "cd /usr/src/release && MAKEOBJDIR=/R make -f Makefile.bsdinstall release $RELEASE_FLAGS" || exit 1