head	1.11;
access;
symbols
	RELEASE_8_3_0:1.11
	RELEASE_9_0_0:1.11
	RELEASE_7_4_0:1.10
	RELEASE_8_2_0:1.10
	RELEASE_8_1_0:1.10
	RELEASE_7_3_0:1.10
	RELEASE_8_0_0:1.10
	RELEASE_7_2_0:1.10
	RELEASE_7_1_0:1.10
	RELEASE_6_4_0:1.10
	RELEASE_6_3_0:1.10
	RELEASE_7_0_0:1.10
	RELEASE_6_2_0:1.10
	RELEASE_5_5_0:1.7
	RELEASE_6_1_0:1.7
	RELEASE_6_0_0:1.7
	RELEASE_5_4_0:1.7
	RELEASE_4_11_0:1.7
	RELEASE_5_3_0:1.7
	RELEASE_4_10_0:1.7
	RELEASE_5_2_1:1.7
	RELEASE_5_2_0:1.7
	RELEASE_4_9_0:1.7
	RELEASE_5_1_0:1.6
	RELEASE_4_8_0:1.6
	RELEASE_5_0_0:1.6
	RELEASE_4_7_0:1.5
	RELEASE_4_6_2:1.5
	RELEASE_4_6_1:1.5
	RELEASE_4_6_0:1.3;
locks; strict;
comment	@# @;


1.11
date	2011.05.15.20.41.31;	author uqs;	state Exp;
branches;
next	1.10;

1.10
date	2006.11.12.18.15.38;	author bmah;	state Exp;
branches;
next	1.9;

1.9
date	2006.11.10.16.52.48;	author bmah;	state Exp;
branches;
next	1.8;

1.8
date	2006.05.29.23.54.51;	author bmah;	state Exp;
branches;
next	1.7;

1.7
date	2003.06.05.23.42.16;	author bmah;	state Exp;
branches;
next	1.6;

1.6
date	2002.10.19.18.39.54;	author bmah;	state Exp;
branches;
next	1.5;

1.5
date	2002.06.28.05.04.42;	author bmah;	state Exp;
branches;
next	1.4;

1.4
date	2002.06.27.15.00.21;	author bmah;	state Exp;
branches;
next	1.3;

1.3
date	2002.04.29.04.47.20;	author bmah;	state Exp;
branches;
next	1.2;

1.2
date	2002.03.07.16.59.21;	author bmah;	state Exp;
branches;
next	1.1;

1.1
date	2002.02.16.17.48.23;	author bmah;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Typo and spelling fixes.
@
text
@# $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.
#
HOSTNAME?=	/bin/hostname
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.
#
# 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.
#
# 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.
#
# 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

DATE!=		date +%Y%m%d
BUILDNAME?=	${DATE}

#
# Set defaults for FORMATS, DOC_LANG, and INSTALL_COMPRESSED.
#
FORMATS?=	pdf html html-split txt
#DOC_LANG?=	en_US.ISO8859-1
INSTALL_COMPRESSED?=	zip gz

#
# Miscellaneous options for the build get set here.
#
# 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.
#
# Turn on RLE encoding and indexing.
#
# Don't make the compatibility symlinks.
#
#MISCOPTIONS+=	NO_JPMAN=yes RLE=yes GEN_INDEX=1 IGNORE_COMPAT_SYMLINK=YES
MISCOPTIONS+=	NO_JPMAN=yes RLE=yes IGNORE_COMPAT_SYMLINK=YES

DOC_PREFIX=	${DOCROOTDIR}/doc
RELNOTES_PREFIX=${DOCROOTDIR}/src/release/doc
DOCSTAGEDIR=	${DOCROOTDIR}/R
DOCBUILDFILE=	${DOCSTAGEDIR}/build.txt
DOCKEYFILE=	${DOCSTAGEDIR}/pgpkeyring.txt
DOCFTPSTAGEDIR=	${DOCSTAGEDIR}/ftp
DOCCDROMSTAGEDIR=	${DOCSTAGEDIR}/cdrom

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
.if !defined(CVSROOT)
	@@${ECHO} "To make a release you must define CVSROOT" && false
.endif
	@@${ECHO} ">>> make ${.TARGET} started on `LC_ALL=C TZ=GMT date`"
# If we're doing a release (from scratch), clean out DOCROOTDIR
# (this is the equivalent of CHROOTDIR for src/release) and checkout
# a clean copy of the documentation.
.if make(release)
	${RM} -rf ${DOCROOTDIR}
	${MKDIR} ${DOCROOTDIR}
.if defined(RELEASETAG)
	cd ${DOCROOTDIR}; \
	cvs -R -d ${CVSROOT} co -r${RELEASETAG} -P doc
.else
	cd ${DOCROOTDIR}; \
	cvs -R -d ${CVSROOT} co -P doc
.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
.endif
	${MKDIR} ${DOCSTAGEDIR}
.endif
# Build documents.
	cd ${DOC_PREFIX} && \
	${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
# Build PGP key ring
	${RM} -f ${DOCKEYFILE}
	cd ${DOC_PREFIX}/en_US.ISO8859-1/books/handbook && ${MAKE} pgpkeyring > ${DOCKEYFILE}
# Construct the build.txt file with the documentation build info.
	${RM} -f ${DOCBUILDFILE}
	${TOUCH} ${DOCBUILDFILE}
	${ECHO} "FreeBSD Documentation ${BUILDNAME}" >> ${DOCBUILDFILE}
	${ECHO} "Generated on:	`LC_ALL=C TZ=GMT date`" >> ${DOCBUILDFILE}
	${ECHO} "Generated by:	${USER}@@`${HOSTNAME}`">> ${DOCBUILDFILE}
	${ECHO} "Formats:	${FORMATS}" >> ${DOCBUILDFILE}
	${ECHO} "Languages:	${DOC_LANG}" >> ${DOCBUILDFILE}
	${ECHO} "Tag:		${RELEASETAG}" >> ${DOCBUILDFILE}
.if defined(MAKE_RELNOTES)
	${ECHO} "Release Documentation Tag:	${RELNOTESTAG}" >> ${DOCBUILDFILE}
.endif
# Make FTP staging area
ftp.1:
	${RM} -rf ${DOCFTPSTAGEDIR}
	${MKDIR} ${DOCFTPSTAGEDIR}
	${MKDIR} -p ${DOCFTPSTAGEDIR}/doc
	cd ${DOC_PREFIX} && \
	${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
# 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}
	${MKDIR} -p ${DOCCDROMSTAGEDIR}/doc
	cd ${DOC_PREFIX} && \
	${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
# 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 FreeBSD_Docs -publisher "The FreeBSD Project.  http://www.freebsd.org/" -o ${DOCSTAGEDIR}/doc.iso ${DOCCDROMSTAGEDIR}
.endif

.include "../share/mk/doc.common.mk"
.include "../share/mk/doc.project.mk"
@


1.10
log
@Add CVS tag information to build.txt metadata file.
@
text
@d75 1
a75 1
# Don't make the compatability symlinks.
@


1.9
log
@Build release documentation if MAKE_RELNOTES is defined.
RELNOTESTAG specifies a CVS tag to use for checking out release
documeentation.

Complain if CVSROOT or DOCROOTDIR aren't defined.

Move all the original doc stuff into a doc/ subdirectory in the
FTP and ISO staging areas, to avoid further cluttering of the top-level
directories.
@
text
@d143 4
a146 1

@


1.8
log
@Prune down the default list of formats both to reduce space requirements
and to reduce runtime dependencies.  (Basically we get rid of PS,
because PDF is probably more widely used; html-split.tar, because
it's probably not that useful on an ISO image; and pdb, to get rid
of a dependency on iSilo).

Change volume title and publisher of ISO image to match precedent
of the real release ISOs.
@
text
@d43 13
d81 1
d112 11
d127 5
a131 1
	${MAKE} all FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS}
d148 1
d150 6
a155 1
	${MAKE} all install DOCDIR=${DOCFTPSTAGEDIR} FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS}
d166 1
d168 6
a173 1
	${MAKE} all install DOCDIR=${DOCCDROMSTAGEDIR} FORMATS="${FORMATS}" INSTALL_COMPRESSED="" ${MISCOPTIONS}
d184 1
@


1.7
log
@Make this more like a "real" release from src.  Rather than building
from the doc sources in the current directory, do a clean checkout
(unless otherwise specified) of a doc tree and build it.
@
text
@d49 1
a49 1
FORMATS?=	ps pdf html html-split html-split.tar txt pdb
d140 1
a140 1
	cd ${DOCROOTDIR} && ${MKISOFS} -r -J -V fbsd_doc -o ${DOCSTAGEDIR}/doc.iso ${DOCCDROMSTAGEDIR}
@


1.6
log
@Compatability symlinks can be confusing...turn them off for this build.
@
text
@a8 2
DOC_PREFIX?=	${.CURDIR}/..

d33 6
d64 2
a65 1
MISCOPTIONS+=	NO_JPMAN=yes RLE=yes GEN_INDEX=1 IGNORE_COMPAT_SYMLINK=YES
d67 4
a70 4
DOCOBJDIR=	${DOCROOTDIR}/obj
DOCBUILDFILE=	${DOCOBJDIR}/build.txt
DOCKEYFILE=	${DOCOBJDIR}/pgpkeyring.txt
DOCSTAGEDIR=	${DOCROOTDIR}/doc
d81 3
d86 2
a87 1
# (this is the equivalent of CHROOTDIR for src/release).
d91 7
a97 2
	${MKDIR} ${DOCOBJDIR}
	find ${DOC_PREFIX} -type d -a \! -name CVS | sed -e s,^,${DOCOBJDIR}, | xargs ${MKDIR}
d100 1
a100 4
# 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.
d102 1
a102 1
	env MAKEOBJDIRPREFIX=${DOCOBJDIR} ${MAKE} all FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS}
d105 1
a105 1
	cd ${DOC_PREFIX}/en_US.ISO8859-1/books/handbook && env ${MAKE} pgpkeyring > ${DOCKEYFILE}
d120 1
a120 1
	env MAKEOBJDIRPREFIX=${DOCOBJDIR} ${MAKE} all install DOCDIR=${DOCFTPSTAGEDIR} FORMATS="${FORMATS}" INSTALL_COMPRESSED="${INSTALL_COMPRESSED}" ${MISCOPTIONS}
d132 1
a132 1
	env MAKEOBJDIRPREFIX=${DOCOBJDIR} ${MAKE} all install DOCDIR=${DOCCDROMSTAGEDIR} FORMATS="${FORMATS}" INSTALL_COMPRESSED="" ${MISCOPTIONS}
d143 1
a143 1
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@


1.5
log
@Fix a couple of botched pathnames.
@
text
@d58 3
a60 1
MISCOPTIONS+=	NO_JPMAN=yes RLE=yes GEN_INDEX=1
@


1.4
log
@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.
@
text
@d80 2
a81 2
	${MKDIR} ${DOCOBJDIR}/obj
	find ${DOC_PREFIX} -type d -a \! -name CVS | sed -e s,^,${DOCOBJDIR}/obj, | xargs ${MKDIR}
@


1.3
log
@Use some better defaults for building documents.
@
text
@d60 3
d64 2
a65 1
DOCBUILDFILE=	${DOCROOTDIR}/doc/BUILD.TXT
d67 4
a70 1
rerelease release:
d80 2
a81 2
	${MKDIR} ${DOCROOTDIR}/obj
	find ${DOC_PREFIX} -type d -a \! -name CVS | sed -e s,^,${DOCROOTDIR}/obj, | xargs ${MKDIR}
d84 1
a84 1
# Build documents in the obj area and install them to our staging area.
d88 6
a93 5
	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.
d101 24
d127 1
a127 1
	cd ${DOCROOTDIR} && ${MKISOFS} -r -J -V fbsd_doc -o doc.iso ${DOCSTAGEDIR}
a128 1
	@@${ECHO} ">>> make ${.TARGET} finished on `LC_ALL=C TZ=GMT date`"
@


1.2
log
@Add user and hostname of builder to doc release meta-info.
@
text
@d43 1
a43 2
# Set defaults for FORMATS and DOC_LANG.  To preserve POLA, these
# should be reflect the defaults.
d45 3
a47 2
FORMATS?=	html
DOC_LANG?=	en_US.ISO8859-1
d50 2
a51 1
# Miscellaneous but mandatory options for the build get set here.
d56 3
a58 1
MISCOPTIONS+=	NO_JPMAN=yes
d81 1
a81 1
	cd ${DOC_PREFIX} && env MAKEOBJDIRPREFIX=${DOCROOTDIR}/obj ${MAKE} all install DOCDIR=${DOCSTAGEDIR} ${MISCOPTIONS}
@


1.1
log
@Add a very simple "doc release" infrastructure, roughly analogous to
src/release/Makefile, but just for doc/.  Useful for creating an
ISO image with various languages/renderings of the FDP documents.
@
text
@d11 1
d87 1
@

