diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-03-13 15:08:06 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-03-13 15:08:06 +0000 |
commit | 5f8e906c3258db5046904aa59a0d8330069679a7 (patch) | |
tree | ecc4939226e1b8b923d247f62119359adda736f4 | |
parent | 15d1cdd161986839d5cebb42a4e2295aa11bbaca (diff) | |
download | FreeBSD-src-5f8e906c3258db5046904aa59a0d8330069679a7.zip FreeBSD-src-5f8e906c3258db5046904aa59a0d8330069679a7.tar.gz |
Connect the full doc build (Handbook, etc.) to the build. This is not built
if no doc checkout is found.
-rw-r--r-- | release/Makefile.bsdinstall | 30 | ||||
-rwxr-xr-x | release/generate-release.sh | 22 |
2 files changed, 40 insertions, 12 deletions
diff --git a/release/Makefile.bsdinstall b/release/Makefile.bsdinstall index 8112003..a2d350f 100644 --- a/release/Makefile.bsdinstall +++ b/release/Makefile.bsdinstall @@ -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 diff --git a/release/generate-release.sh b/release/generate-release.sh index 17f253d..08232ee 100755 --- a/release/generate-release.sh +++ b/release/generate-release.sh @@ -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 |