2002-02-16 18:48:23 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Documentation release building. These are used to create
|
|
|
|
# distributions of the documentation files only. These recipes are
|
|
|
|
# intended to mimic src/release/Makefile; the principal difference is
|
|
|
|
# that much of the complexity brought about by the chroot environment
|
|
|
|
# is unneeded.
|
|
|
|
#
|
2002-03-07 17:59:21 +01:00
|
|
|
HOSTNAME?= /bin/hostname
|
2002-02-16 18:48:23 +01:00
|
|
|
MKISOFS?= mkisofs
|
|
|
|
TAR?= /usr/bin/tar
|
|
|
|
TOUCH?= /usr/bin/touch
|
|
|
|
|
|
|
|
#
|
|
|
|
# Targets:
|
|
|
|
#
|
|
|
|
# release Create a clean build of the documentation files,
|
|
|
|
# obeying the usual specifications such as FORMATS=,
|
|
|
|
# DOC_LANG=, etc.
|
|
|
|
#
|
|
|
|
# rerelease Similar to release, except that existing documentation
|
|
|
|
# renderings are preserved and installed.
|
|
|
|
#
|
|
|
|
# Configuration variables:
|
|
|
|
#
|
|
|
|
# BUILDNAME Identification string to be placed in BUILDNAME file
|
|
|
|
# in the top directory of the release.
|
|
|
|
#
|
|
|
|
# DOCROOTDIR Top directory to use for document release building.
|
|
|
|
# This directory need not exist, and will be created
|
|
|
|
# if necessary. This variable MUST be defined.
|
|
|
|
#
|
2003-06-06 01:42:16 +02:00
|
|
|
# CVSROOT $CVSROOT for checking out a doc/ tree. This variable
|
|
|
|
# MUST be defined.
|
|
|
|
#
|
|
|
|
# RELEASETAG CVS tag to use for checkouts. If not defined,
|
|
|
|
# treated as a checkout at HEAD.
|
|
|
|
#
|
2002-02-16 18:48:23 +01:00
|
|
|
# MAKE_ISOS If defined, this will enable creation of an ISO image
|
|
|
|
# from the document release. Creation of ISO images
|
|
|
|
# requires a mkisofs binary in the invoking user's path.
|
|
|
|
#
|
2006-11-10 17:52:48 +01:00
|
|
|
# MAKE_RELNOTES If defined, enables generation of release documentation.
|
|
|
|
#
|
|
|
|
# RELNOTESTAG CVS tag to use for checkouts of the release documentation.
|
|
|
|
# If not defined, treated as a checkout from HEAD.
|
|
|
|
#
|
|
|
|
.if !defined(DOCROOTDIR)
|
|
|
|
.error "You must define DOCROOTDIR!"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(CVSROOT)
|
|
|
|
.error "You must define CVSROOT!"
|
|
|
|
.endif
|
|
|
|
|
2002-02-16 18:48:23 +01:00
|
|
|
DATE!= date +%Y%m%d
|
|
|
|
BUILDNAME?= ${DATE}
|
|
|
|
|
|
|
|
#
|
2002-04-29 06:47:20 +02:00
|
|
|
# Set defaults for FORMATS, DOC_LANG, and INSTALL_COMPRESSED.
|
2002-02-16 18:48:23 +01:00
|
|
|
#
|
2006-05-30 01:54:51 +02:00
|
|
|
FORMATS?= pdf html html-split txt
|
2002-04-29 06:47:20 +02:00
|
|
|
#DOC_LANG?= en_US.ISO8859-1
|
|
|
|
INSTALL_COMPRESSED?= zip gz
|
2002-02-16 18:48:23 +01:00
|
|
|
|
|
|
|
#
|
2002-04-29 06:47:20 +02:00
|
|
|
# Miscellaneous options for the build get set here.
|
|
|
|
#
|
2002-02-16 18:48:23 +01:00
|
|
|
# The Japanese translation team has a set of manual pages; we turn
|
|
|
|
# these off (at least for now) because we have not worked their
|
|
|
|
# install target into our scheme.
|
|
|
|
#
|
2002-04-29 06:47:20 +02:00
|
|
|
# Turn on RLE encoding and indexing.
|
|
|
|
#
|
2011-05-15 22:41:31 +02:00
|
|
|
# Don't make the compatibility symlinks.
|
2002-10-19 20:39:54 +02:00
|
|
|
#
|
2003-06-06 01:42:16 +02:00
|
|
|
#MISCOPTIONS+= NO_JPMAN=yes RLE=yes GEN_INDEX=1 IGNORE_COMPAT_SYMLINK=YES
|
|
|
|
MISCOPTIONS+= NO_JPMAN=yes RLE=yes IGNORE_COMPAT_SYMLINK=YES
|
2002-02-16 18:48:23 +01:00
|
|
|
|
2003-06-06 01:42:16 +02:00
|
|
|
DOC_PREFIX= ${DOCROOTDIR}/doc
|
2006-11-10 17:52:48 +01:00
|
|
|
RELNOTES_PREFIX=${DOCROOTDIR}/src/release/doc
|
2003-06-06 01:42:16 +02:00
|
|
|
DOCSTAGEDIR= ${DOCROOTDIR}/R
|
|
|
|
DOCBUILDFILE= ${DOCSTAGEDIR}/build.txt
|
|
|
|
DOCKEYFILE= ${DOCSTAGEDIR}/pgpkeyring.txt
|
2002-06-27 17:00:21 +02:00
|
|
|
DOCFTPSTAGEDIR= ${DOCSTAGEDIR}/ftp
|
|
|
|
DOCCDROMSTAGEDIR= ${DOCSTAGEDIR}/cdrom
|
2002-02-16 18:48:23 +01:00
|
|
|
|
2002-06-27 17:00:21 +02:00
|
|
|
rerelease release: release.1 ftp.1 cdrom.1
|
|
|
|
@${ECHO} ">>> make ${.TARGET} finished on `LC_ALL=C TZ=GMT date`"
|
|
|
|
|
|
|
|
release.1:
|
2002-02-16 18:48:23 +01:00
|
|
|
.if !defined(DOCROOTDIR)
|
|
|
|
@${ECHO} "To make a release you must define DOCROOTDIR" && false
|
2003-06-06 01:42:16 +02:00
|
|
|
.endif
|
|
|
|
.if !defined(CVSROOT)
|
|
|
|
@${ECHO} "To make a release you must define CVSROOT" && false
|
2002-02-16 18:48:23 +01:00
|
|
|
.endif
|
|
|
|
@${ECHO} ">>> make ${.TARGET} started on `LC_ALL=C TZ=GMT date`"
|
|
|
|
# If we're doing a release (from scratch), clean out DOCROOTDIR
|
2003-06-06 01:42:16 +02:00
|
|
|
# (this is the equivalent of CHROOTDIR for src/release) and checkout
|
|
|
|
# a clean copy of the documentation.
|
2002-02-16 18:48:23 +01:00
|
|
|
.if make(release)
|
|
|
|
${RM} -rf ${DOCROOTDIR}
|
|
|
|
${MKDIR} ${DOCROOTDIR}
|
2003-06-06 01:42:16 +02:00
|
|
|
.if defined(RELEASETAG)
|
|
|
|
cd ${DOCROOTDIR}; \
|
|
|
|
cvs -R -d ${CVSROOT} co -r${RELEASETAG} -P doc
|
|
|
|
.else
|
|
|
|
cd ${DOCROOTDIR}; \
|
|
|
|
cvs -R -d ${CVSROOT} co -P doc
|
2006-11-10 17:52:48 +01:00
|
|
|
.endif
|
|
|
|
.if defined(MAKE_RELNOTES)
|
|
|
|
.if defined(RELNOTESTAG)
|
|
|
|
cd ${DOCROOTDIR}; \
|
|
|
|
cvs -R -d ${CVSROOT} co -r${RELNOTESTAG} -P src/release/doc; \
|
|
|
|
cvs -R -d ${CVSROOT} co -r${RELNOTESTAG} -P src/share/man/man4
|
|
|
|
.else
|
|
|
|
cd ${DOCROOTDIR}; \
|
|
|
|
cvs -R -d ${CVSROOT} co -P src/release/doc; \
|
|
|
|
cvs -R -d ${CVSROOT} co -P src/share/man/man4
|
|
|
|
.endif
|
2003-06-06 01:42:16 +02:00
|
|
|
.endif
|
2002-02-16 18:48:23 +01:00
|
|
|
${MKDIR} ${DOCSTAGEDIR}
|
|
|
|
.endif
|
2003-06-06 01:42:16 +02:00
|
|
|
# Build documents.
|
2002-06-27 17:00:21 +02:00
|
|
|
cd ${DOC_PREFIX} && \
|
2006-11-10 17:52:48 +01:00
|
|
|
${MAKE} FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS} all
|
|
|
|
.if defined(MAKE_RELNOTES)
|
|
|
|
cd ${RELNOTES_PREFIX} && \
|
|
|
|
${MAKE} FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS} all
|
|
|
|
.endif
|
2002-06-27 17:00:21 +02:00
|
|
|
# Build PGP key ring
|
|
|
|
${RM} -f ${DOCKEYFILE}
|
2003-06-06 01:42:16 +02:00
|
|
|
cd ${DOC_PREFIX}/en_US.ISO8859-1/books/handbook && ${MAKE} pgpkeyring > ${DOCKEYFILE}
|
2002-06-27 17:00:21 +02:00
|
|
|
# Construct the build.txt file with the documentation build info.
|
2002-02-16 18:48:23 +01:00
|
|
|
${RM} -f ${DOCBUILDFILE}
|
|
|
|
${TOUCH} ${DOCBUILDFILE}
|
|
|
|
${ECHO} "FreeBSD Documentation ${BUILDNAME}" >> ${DOCBUILDFILE}
|
|
|
|
${ECHO} "Generated on: `LC_ALL=C TZ=GMT date`" >> ${DOCBUILDFILE}
|
2002-03-07 17:59:21 +01:00
|
|
|
${ECHO} "Generated by: ${USER}@`${HOSTNAME}`">> ${DOCBUILDFILE}
|
2002-02-16 18:48:23 +01:00
|
|
|
${ECHO} "Formats: ${FORMATS}" >> ${DOCBUILDFILE}
|
|
|
|
${ECHO} "Languages: ${DOC_LANG}" >> ${DOCBUILDFILE}
|
2006-11-12 19:15:38 +01:00
|
|
|
${ECHO} "Tag: ${RELEASETAG}" >> ${DOCBUILDFILE}
|
|
|
|
.if defined(MAKE_RELNOTES)
|
|
|
|
${ECHO} "Release Documentation Tag: ${RELNOTESTAG}" >> ${DOCBUILDFILE}
|
|
|
|
.endif
|
2002-06-27 17:00:21 +02:00
|
|
|
# Make FTP staging area
|
|
|
|
ftp.1:
|
|
|
|
${RM} -rf ${DOCFTPSTAGEDIR}
|
|
|
|
${MKDIR} ${DOCFTPSTAGEDIR}
|
2006-11-10 17:52:48 +01:00
|
|
|
${MKDIR} -p ${DOCFTPSTAGEDIR}/doc
|
2002-06-27 17:00:21 +02:00
|
|
|
cd ${DOC_PREFIX} && \
|
2006-11-10 17:52:48 +01:00
|
|
|
${MAKE} install DOCDIR=${DOCFTPSTAGEDIR}/doc FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS}
|
|
|
|
.if defined(MAKE_RELNOTES)
|
|
|
|
${MKDIR} -p ${DOCFTPSTAGEDIR}/src/release/doc
|
|
|
|
cd ${RELNOTES_PREFIX} && \
|
|
|
|
${MAKE} install DOCDIR=${DOCFTPSTAGEDIR}/src/release/doc FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS}
|
|
|
|
.endif
|
2002-06-27 17:00:21 +02:00
|
|
|
# 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}
|
2006-11-10 17:52:48 +01:00
|
|
|
${MKDIR} -p ${DOCCDROMSTAGEDIR}/doc
|
2002-06-27 17:00:21 +02:00
|
|
|
cd ${DOC_PREFIX} && \
|
2006-11-10 17:52:48 +01:00
|
|
|
${MAKE} install DOCDIR=${DOCCDROMSTAGEDIR}/doc FORMATS="${FORMATS}" INSTALL_COMPRESSED="" ${MISCOPTIONS}
|
|
|
|
.if defined(MAKE_RELNOTES)
|
|
|
|
${MKDIR} -p ${DOCCDROMSTAGEDIR}/src/release/doc
|
|
|
|
cd ${RELNOTES_PREFIX} && \
|
|
|
|
${MAKE} install DOCDIR=${DOCCDROMSTAGEDIR}/src/release/doc FORMATS="${FORMATS}" INSTALL_COMPRESSED="" ${MISCOPTIONS}
|
|
|
|
.endif
|
2002-06-27 17:00:21 +02:00
|
|
|
# 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}
|
2002-02-16 18:48:23 +01:00
|
|
|
# Make ISO images if desired.
|
|
|
|
.if defined(MAKE_ISOS)
|
2006-05-30 01:54:51 +02:00
|
|
|
cd ${DOCROOTDIR} && ${MKISOFS} -r -J -V FreeBSD_Docs -publisher "The FreeBSD Project. http://www.freebsd.org/" -o ${DOCSTAGEDIR}/doc.iso ${DOCCDROMSTAGEDIR}
|
2002-02-16 18:48:23 +01:00
|
|
|
.endif
|
|
|
|
|
2006-11-10 17:52:48 +01:00
|
|
|
.include "../share/mk/doc.common.mk"
|
2003-06-06 01:42:16 +02:00
|
|
|
.include "../share/mk/doc.project.mk"
|