From 412dedcf5547ebb1358c69a324c45632cbc2b6c9 Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Thu, 27 Jun 2002 15:00:21 +0000 Subject: Make separate FTP and CDROM staging areas. The FTP area has compressed documentation by default, and the CDROM area doesn't (to avoid cluttering up directories). Also include a PGP key ring in the build, and tweak texts slightly. --- release/Makefile | 55 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 12 deletions(-) (limited to 'release/Makefile') diff --git a/release/Makefile b/release/Makefile index 2bf93ef39f..8463b1099f 100644 --- a/release/Makefile +++ b/release/Makefile @@ -57,10 +57,17 @@ INSTALL_COMPRESSED?= zip gz # MISCOPTIONS+= NO_JPMAN=yes RLE=yes GEN_INDEX=1 +DOCOBJDIR= ${DOCROOTDIR}/obj +DOCBUILDFILE= ${DOCOBJDIR}/build.txt +DOCKEYFILE= ${DOCOBJDIR}/pgpkeyring.txt DOCSTAGEDIR= ${DOCROOTDIR}/doc -DOCBUILDFILE= ${DOCROOTDIR}/doc/BUILD.TXT +DOCFTPSTAGEDIR= ${DOCSTAGEDIR}/ftp +DOCCDROMSTAGEDIR= ${DOCSTAGEDIR}/cdrom -rerelease release: +rerelease release: release.1 ftp.1 cdrom.1 + @${ECHO} ">>> make ${.TARGET} finished on `LC_ALL=C TZ=GMT date`" + +release.1: .if !defined(DOCROOTDIR) @${ECHO} "To make a release you must define DOCROOTDIR" && false .endif @@ -70,19 +77,20 @@ rerelease release: .if make(release) ${RM} -rf ${DOCROOTDIR} ${MKDIR} ${DOCROOTDIR} - ${MKDIR} ${DOCROOTDIR}/obj - find ${DOC_PREFIX} -type d -a \! -name CVS | sed -e s,^,${DOCROOTDIR}/obj, | xargs ${MKDIR} + ${MKDIR} ${DOCOBJDIR}/obj + find ${DOC_PREFIX} -type d -a \! -name CVS | sed -e s,^,${DOCOBJDIR}/obj, | xargs ${MKDIR} ${MKDIR} ${DOCSTAGEDIR} .endif -# Build documents in the obj area and install them to our staging area. +# Build documents in the obj area. # We do this so as to avoid interference with any built documents that # happen to be sitting under ${DOC_PREFIX}, which might be built with # different options, etc. - cd ${DOC_PREFIX} && env MAKEOBJDIRPREFIX=${DOCROOTDIR}/obj ${MAKE} all install DOCDIR=${DOCSTAGEDIR} FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS} -# Copy any files in our texts/ directory to the staging area. - ${TAR} --exclude CVS -cf - -C ${.CURDIR}/texts . | \ - ${TAR} xf - -C ${DOCSTAGEDIR} -# Construct the BUILD.TXT file with the documentation build info. + cd ${DOC_PREFIX} && \ + env MAKEOBJDIRPREFIX=${DOCOBJDIR} ${MAKE} all FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS} +# Build PGP key ring + ${RM} -f ${DOCKEYFILE} + cd ${DOC_PREFIX}/en_US.ISO8859-1/books/handbook && env ${MAKE} pgpkeyring > ${DOCKEYFILE} +# Construct the build.txt file with the documentation build info. ${RM} -f ${DOCBUILDFILE} ${TOUCH} ${DOCBUILDFILE} ${ECHO} "FreeBSD Documentation ${BUILDNAME}" >> ${DOCBUILDFILE} @@ -90,10 +98,33 @@ rerelease release: ${ECHO} "Generated by: ${USER}@`${HOSTNAME}`">> ${DOCBUILDFILE} ${ECHO} "Formats: ${FORMATS}" >> ${DOCBUILDFILE} ${ECHO} "Languages: ${DOC_LANG}" >> ${DOCBUILDFILE} + +# Make FTP staging area +ftp.1: + ${RM} -rf ${DOCFTPSTAGEDIR} + ${MKDIR} ${DOCFTPSTAGEDIR} + cd ${DOC_PREFIX} && \ + env MAKEOBJDIRPREFIX=${DOCOBJDIR} ${MAKE} all install DOCDIR=${DOCFTPSTAGEDIR} FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS} +# Copy newly generated files to staging area + ${CP} ${DOCBUILDFILE} ${DOCKEYFILE} ${DOCFTPSTAGEDIR} +# Copy any files in our texts/ directory to staging area + ${TAR} --exclude CVS -cf - -C ${.CURDIR}/texts . | \ + ${TAR} xf - -C ${DOCFTPSTAGEDIR} + +# Make CDROM staging area, optionally do ISO images too +cdrom.1: + ${RM} -rf ${DOCCDROMSTAGEDIR} + ${MKDIR} ${DOCCDROMSTAGEDIR} + cd ${DOC_PREFIX} && \ + env MAKEOBJDIRPREFIX=${DOCOBJDIR} ${MAKE} all install DOCDIR=${DOCCDROMSTAGEDIR} FORMATS="${FORMATS}" INSTALL_COMPRESSED="" ${MISCOPTIONS} +# Copy newly generated files to staging area + ${CP} ${DOCBUILDFILE} ${DOCKEYFILE} ${DOCCDROMSTAGEDIR} +# Copy any files in our texts/ directory to the staging area. + ${TAR} --exclude CVS -cf - -C ${.CURDIR}/texts . | \ + ${TAR} xf - -C ${DOCCDROMSTAGEDIR} # Make ISO images if desired. .if defined(MAKE_ISOS) - cd ${DOCROOTDIR} && ${MKISOFS} -r -J -V fbsd_doc -o doc.iso ${DOCSTAGEDIR} + cd ${DOCROOTDIR} && ${MKISOFS} -r -J -V fbsd_doc -o ${DOCSTAGEDIR}/doc.iso ${DOCCDROMSTAGEDIR} .endif - @${ECHO} ">>> make ${.TARGET} finished on `LC_ALL=C TZ=GMT date`" .include "${DOC_PREFIX}/share/mk/doc.project.mk" -- cgit v1.2.3