head	1.33;
access;
symbols
	RELEASE_4_3_0:1.31
	RELEASE_4_2_0:1.29
	RELEASE_4_1_0:1.29
	RELEASE_3_5_0:1.28;
locks; strict;
comment	@# @;


1.33
date	2001.06.11.01.17.33;	author ache;	state dead;
branches;
next	1.32;

1.32
date	2001.05.14.03.07.50;	author murray;	state Exp;
branches;
next	1.31;

1.31
date	2001.02.28.22.50.05;	author nik;	state Exp;
branches;
next	1.30;

1.30
date	2000.12.01.00.58.11;	author jim;	state Exp;
branches;
next	1.29;

1.29
date	2000.07.12.14.35.51;	author nbm;	state Exp;
branches;
next	1.28;

1.28
date	2000.03.20.20.59.30;	author jim;	state Exp;
branches;
next	1.27;

1.27
date	2000.03.08.11.12.10;	author nbm;	state Exp;
branches;
next	1.26;

1.26
date	99.09.06.06.52.44;	author peter;	state Exp;
branches;
next	1.25;

1.25
date	99.09.03.17.40.54;	author nik;	state Exp;
branches;
next	1.24;

1.24
date	99.08.29.00.02.23;	author jhb;	state Exp;
branches;
next	1.23;

1.23
date	99.08.28.19.49.39;	author jhb;	state Exp;
branches;
next	1.22;

1.22
date	99.08.17.21.35.54;	author nik;	state Exp;
branches;
next	1.21;

1.21
date	99.05.05.20.31.23;	author nik;	state Exp;
branches;
next	1.20;

1.20
date	99.04.15.22.51.18;	author nik;	state Exp;
branches;
next	1.19;

1.19
date	99.04.12.21.40.25;	author nik;	state Exp;
branches;
next	1.18;

1.18
date	99.04.04.16.43.08;	author nik;	state Exp;
branches;
next	1.17;

1.17
date	99.03.27.16.03.49;	author nik;	state Exp;
branches;
next	1.16;

1.16
date	99.03.22.22.16.23;	author nik;	state Exp;
branches;
next	1.15;

1.15
date	99.03.18.20.37.12;	author nik;	state Exp;
branches;
next	1.14;

1.14
date	99.03.12.22.24.07;	author nik;	state Exp;
branches;
next	1.13;

1.13
date	99.03.08.21.44.45;	author nik;	state Exp;
branches;
next	1.12;

1.12
date	99.01.30.00.10.35;	author nik;	state Exp;
branches;
next	1.11;

1.11
date	99.01.27.23.39.47;	author nik;	state Exp;
branches;
next	1.10;

1.10
date	99.01.25.22.00.40;	author nik;	state Exp;
branches;
next	1.9;

1.9
date	99.01.25.21.58.47;	author nik;	state Exp;
branches;
next	1.8;

1.8
date	99.01.03.21.19.03;	author nik;	state Exp;
branches;
next	1.7;

1.7
date	98.12.20.20.33.49;	author nik;	state Exp;
branches;
next	1.6;

1.6
date	98.12.10.20.42.26;	author nik;	state Exp;
branches;
next	1.5;

1.5
date	98.11.12.01.20.35;	author nik;	state Exp;
branches;
next	1.4;

1.4
date	98.06.30.09.09.23;	author nik;	state Exp;
branches;
next	1.3;

1.3
date	98.06.30.09.04.12;	author nik;	state Exp;
branches;
next	1.2;

1.2
date	98.06.29.08.23.32;	author nik;	state Exp;
branches;
next	1.1;

1.1
date	98.06.18.09.06.04;	author nik;	state Exp;
branches;
next	;


desc
@@


1.33
log
@ISO_* -> ISO* rename
@
text
@# 
# $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/Makefile,v 1.32 2001/05/14 03:07:50 murray Exp $
#
# Build the FreeBSD Handbook.
#

MAINTAINER=nik@@FreeBSD.org

DOC?= book

FORMATS?= html-split

INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=

# 
# SRCS lists the individual SGML files that make up the document. Changes
# to any of these files will force a rebuild
#

# SGML content
SRCS=  book.sgml
SRCS+= advanced-networking/chapter.sgml
SRCS+= backups/chapter.sgml
SRCS+= basics/chapter.sgml
SRCS+= bibliography/chapter.sgml
SRCS+= boot/chapter.sgml
SRCS+= contrib/chapter.sgml
SRCS+= cutting-edge/chapter.sgml
SRCS+= disks/chapter.sgml
SRCS+= eresources/chapter.sgml
SRCS+= hw/chapter.sgml
SRCS+= install/chapter.sgml
SRCS+= introduction/chapter.sgml
SRCS+= kernelconfig/chapter.sgml
SRCS+= kerneldebug/chapter.sgml
SRCS+= kernelopts/chapter.sgml
SRCS+= l10n/chapter.sgml
SRCS+= linuxemu/chapter.sgml
SRCS+= mail/chapter.sgml
SRCS+= mirrors/chapter.sgml
SRCS+= pgpkeys/chapter.sgml
SRCS+= policies/chapter.sgml
SRCS+= ppp-and-slip/chapter.sgml
SRCS+= printing/chapter.sgml
SRCS+= security/chapter.sgml
SRCS+= serialcomms/chapter.sgml
SRCS+= sound/chapter.sgml
SRCS+= staff/chapter.sgml
SRCS+= users/chapter.sgml
SRCS+= x11/chapter.sgml
SRCS+= ports/chapter.sgml

# Entities
SRCS+= authors.ent 
SRCS+= chapters.ent 
SRCS+= mailing-lists.ent

SYMLINKS=	${DESTDIR} index.html handbook.html

# XXX The Handbook build currently overflows some internal, hardcoded 
# limits in pdftex.  Until we split the Handbook up, build the PDF 
# version using ps2pdf instead of pdftex.

book.tex-pdf:
	touch book.tex-pdf

book.pdf: book.ps
	ps2pdf book.ps book.pdf

DOC_PREFIX?= ${.CURDIR}/../../..
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@


1.32
log
@Remove the FreeBSD Internals Chapter.  The contents have been moved to
several different chapters in the Developers' Handbook.
@
text
@d2 1
a2 1
# $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/Makefile,v 1.31 2001/02/28 22:50:05 nik Exp $
@


1.31
log
@The Handbook build currently overflows some internal, hardcoded limits
in pdftex.  This is bad.  Until we (possibly) split the Handbook up into
lots of baby handbooks, build the PDF version using ps2pdf instead of
pdftex.

ps2pdf is part of ghostscript, but we updated textproc/docproj to require
that a few days ago.
@
text
@d2 1
a2 1
# $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/Makefile,v 1.30 2000/12/01 00:58:11 jim Exp $
a33 1
SRCS+= internals/chapter.sgml
@


1.30
log
@Add a sound chapter to the handbook.  Now we have somewhere to send all of
those people asking for help with sound.  Woo hoo! :-)

Submitted by:	Moses Moore <jm-moses@@home.com>
@
text
@d2 1
a2 1
# $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/Makefile,v 1.29 2000/07/12 14:35:51 nbm Exp $
d61 10
@


1.29
log
@Make a symlink handbook.html pointing to index.html, for some
documentation that doesn't know about our changes.  (including the
current version of the handbook)

PR:		docs/19565
Submitted by:	Jens Schweikhardt <schweik@@noc.dfn.de>
@
text
@d2 1
a2 1
# $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/Makefile,v 1.28 2000/03/20 20:59:30 jim Exp $
d49 1
@


1.28
log
@Move the quotas chapter into the disks chapter.
@
text
@d2 1
a2 1
# $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/Makefile,v 1.27 2000/03/08 11:12:10 nbm Exp $
d58 2
@


1.27
log
@Add the users chapter, as discussed on -doc.

Reviewed by:	freebsd-doc
@
text
@d2 1
a2 1
# $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/Makefile,v 1.26 1999/09/06 06:52:44 peter Exp $
d27 1
a46 1
SRCS+= quotas/chapter.sgml
@


1.26
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
d50 1
@


1.25
log
@Use doc.project.mk, and ${.CURDIR}
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.24 1999/08/29 00:02:23 jhb Exp $
@


1.24
log
@Make the doc/en_* makefiles repect ${DOC_PREFIX} when they include
${DOC_PREFIX}/share/mk/docproj.docbook.mk instead of using hard-coded
paths.

Reviewed partially by:	nik, billf
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.23 1999/08/28 19:49:39 jhb Exp $
d58 2
a59 2
DOC_PREFIX?= ../../..
.include "${DOC_PREFIX}/share/mk/docproj.docbook.mk"
@


1.23
log
@FreeBSD.ORG -> FreeBSD.org for the MAINTAINERS e-mail address.
Translators can ignore this commit.

Reviewed by:	billf, nik
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.22 1999/08/17 21:35:54 nik Exp $
d59 1
a59 1
.include "../../../share/mk/docproj.docbook.mk"
@


1.22
log
@More Makefile framework.  I don't know why CVS didn't commit these with
the other batch.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.21 1999/05/05 20:31:23 nik Exp $
d7 1
a7 1
MAINTAINER=nik@@FreeBSD.ORG
@


1.21
log
@Removed empty JADEOPTS definition.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.20 1999/04/15 22:51:18 nik Exp $
d9 1
a9 1
DOC?= handbook
d22 1
a22 1
SRCS=  handbook.sgml
d58 2
a59 1
.include "../../share/mk/docproj.docbook.mk"
@


1.20
log
@Cut down the Makefile, most of the logic is now in
doc/share/mk/docproj.docbook.mk.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.19 1999/04/12 21:40:25 nik Exp $
a7 2

JADEOPTS=
@


1.19
log
@Add new html-split.tar target, for building an (optionally) compressed
tar file of the HTML files.  Functionality stays the same, but the
method is slightly different.

*.html-split.tar{.gz,.bz2,.zip} now removed on "make clean" as well,
as pointed out by Shadowfax, or Strider, or whatever Satoshi's calling
himself these days. . .
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.18 1999/04/04 16:43:08 nik Exp $
d4 1
a4 3
# Build the FreeBSD Handbook. Will eventually split in two, a generic .mk
# file which can be used by many Makefiles, and a much smaller Makefile
# which uses the generic.mk file.
a5 6
# Note: Doing all this in a Makefile is a little odd. This is because there
# is typically not a 1:1 mapping between the .sgml files and the .html,
# .rtf, .ps, and other formats. For most of them, all the .sgml files will
# become one file in the chosen output format. For HTML, many .html files
# will be produced, but they won't be named after the corresponding .sgml
# files.
a10 6
#
# DOC is the root name of file(s) that will be generated (i.e, for
# foo.rtf, foo.ps, etc, DOC=foo. HTML generation ignores this, it 
# is assumed that the stylesheet names this. If not set, DOC defaults
# to the name of the current directory.
#
d13 1
a13 15
#
# FORMATS lists the output formats that should be generated. Valid values
# are 
#
#    txt html html-split html-split.tar ps pdf rtf tar
#
# html-split is the file split into (probably) many individual HTML files,
# linked from one index.html file.
#
# html-split.tar is all these HTML files tarred up.
#
# This setting also affects which files will be removed with 'make clean'.
# If you 'make' with one setting, and 'make clean' with another, don't
# be surprised if it doesn't work.
FORMATS?= html-split.tar
a14 8
#
# INSTALL_COMPRESSED lists the compressed versions to be installed by the
# install-* targets. Valid values are
#
#    gz zip bz2
#
# If left empty then no files will be installed compressed.
#
a15 5

#
# INSTALL_ONLY_COMPRESSED is non-empty if you only want to install the
# compressed versions of built files. 
#
d60 1
a60 297
# ------------------------------------------------------------------------
#
# You shouldn't need to change definitions below here

VOLUME?=	${.CURDIR:T}
DOC?=		${.CURDIR:T}
DISTRIBUTION?=	doc

JADE=		/usr/local/bin/jade
DSLHTML=	../../share/sgml/freebsd.dsl
DSLPRINT=	../../share/sgml/freebsd.dsl

FREEBSDCATALOG= ../../share/sgml/catalog
DOCBOOKCATALOG= /usr/local/share/sgml/docbook/3.0/catalog
JADECATALOG=	/usr/local/share/sgml/jade/catalog
DSSSLCATALOG=   /usr/local/share/sgml/docbook/dsssl/modular/catalog

JADEFLAGS=	${JADEOPTS} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG}

KNOWN_FORMATS= html html-split html-split.tar txt rtf ps pdf tex dvi tar

# ------------------------------------------------------------------------
#
# Look at ${FORMATS} and work out which documents need to be generated.
# It is assumed that the HTML transformation will always create a file
# called index.html, and that for every other transformation the name
# of the generated file is ${DOC}.format.
#
# ${_docs} will be set to a list of all documents that must be made
# up to date.
#
# ${CLEANFILES} is a list of files that should be removed by the "clean"
# target. ${COMPRESS_EXT:S/^/${DOC}.${_cf}.&/ takes the COMPRESS_EXT var,
# and prepends the filename to each listed extension, building a second
# list of files with the compressed extensions added.
#

# Note: ".for _curformat in ${KNOWN_FORMATS}" is used several times in this
# file. I know they could have been rolled together in to one, much larger,
# loop. However, that would have made things more complicated for a newcomer
# to this file to unravel and understand, and a syntax error in the loop
# would have affected the entire build/compress/install process, instead
# of just one of them, making it more difficult to debug.

# Note: It is the aim of this file that *all* the targets be available,
# not just those appropriate to the current ${FORMATS} and
# ${INSTALL_COMPRESSED} values.
#
# For example, if FORMATS=html and INSTALL_COMPRESSED=gz you could still
# type
#
#     make book.rtf.bz2
#
# and it will do the right thing. Or
#
#     make install-rtf.bz2
#
# for that matter. But don't expect "make clean" to work if the FORMATS
# and INSTALL_COMPRESSED variables are wrong.
#

.for _curformat in ${FORMATS}
_cf=${_curformat}
.if ${_cf} == "html-split"
_docs+= index.html HTML.manifest
CLEANFILES+= `xargs < HTML.manifest` HTML.manifest
.elif ${_cf} == "html-split.tar"
_docs+= ${DOC}.html-split.tar
CLEANFILES+= `xargs < HTML.manifest` HTML.manifest
CLEANFILES+= ${DOC}.html-split.tar
.elif ${_cf} == "html"
_docs+= ${DOC}.html
CLEANFILES+= ${DOC}.html
.elif ${_cf} == "txt"
_docs+= ${DOC}.txt
CLEANFILES+= ${DOC}.html ${DOC}.txt
.elif ${_cf} == "dvi"
_docs+= ${DOC}.dvi
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex
.elif ${_cf} == "ps"
_docs+= ${DOC}.ps
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex ${DOC}.ps
.elif ${_cf} == "pdf"
_docs+= ${DOC}.pdf
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex ${DOC}.pdf
.elif ${_cf} == "rtf"
_docs+= ${DOC}.rtf
CLEANFILES+= ${DOC}.rtf
.elif ${_cf} == "tar"
_docs+= ${DOC}.tar
CLEANFILES+= ${DOC}.tar
.endif
.endfor

#
# Build a list of install-${format}.${compress_format} targets to be
# by "make install". Also, add ${DOC}.${format}.${compress_format} to
# ${_docs} and ${CLEANFILES} so they get built/cleaned by "all" and
# "clean".
#
.if !empty(INSTALL_COMPRESSED)
.for _curformat in ${FORMATS}
_cf=${_curformat}
.for _curcomp in ${INSTALL_COMPRESSED}
.if ${_cf} != "html-split" 
_curinst+= install-${_curformat}.${_curcomp}
_docs+= ${DOC}.${_curformat}.${_curcomp}
CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
.endif
.endfor
.endfor
.endif

# ------------------------------------------------------------------------
#
# Targets
#

#
# Build Targets
#

# If no target is specifed then .MAIN is made
.MAIN: all

all: ${_docs}

index.html HTML.manifest: ${SRCS}
	${JADE} -V html-manifest -ioutput.html ${JADEFLAGS} -d ${DSLHTML} -t sgml ${DOC}.sgml
	-tidy -i -m -f /dev/null *.html

${DOC}.html: ${SRCS}
	${JADE} -ioutput.html -V nochunks ${JADEFLAGS} -d ${DSLHTML} -t sgml ${DOC}.sgml > ${DOC}.html
	-tidy -i -m -f /dev/null ${DOC}.html

${DOC}.html-split.tar: HTML.manifest
	tar cf ${.TARGET} `xargs < HTML.manifest`

${DOC}.txt: ${DOC}.html
	lynx -nolist -dump ${DOC}.html > ${DOC}.txt

${DOC}.rtf: ${SRCS}
	${JADE} -Vrtf-backend -ioutput.print ${JADEFLAGS} -d ${DSLPRINT} -t rtf ${DOC}.sgml

${DOC}.tex: ${SRCS}
	${JADE} -Vtex-backend -ioutput.print ${JADEFLAGS} -d ${DSLPRINT} -t tex ${DOC}.sgml

${DOC}.dvi: ${DOC}.tex
	@@echo "==> TeX pass 1/3"
	-tex "&jadetex" ${DOC}.tex
	@@echo "==> TeX pass 2/3"
	-tex "&jadetex" ${DOC}.tex
	@@echo "==> TeX pass 3/3"
	-tex "&jadetex" ${DOC}.tex

${DOC}.pdf: ${DOC}.tex
	@@echo "==> PDFTeX pass 1/3"
	-pdftex "&pdfjadetex" ${DOC}.tex
	@@echo "==> PDFTeX pass 2/3"
	-pdftex "&pdfjadetex" ${DOC}.tex
	@@echo "==> PDFTeX pass 3/3"
	pdftex "&pdfjadetex" ${DOC}.tex

${DOC}.ps: ${DOC}.dvi
	dvips -o ${DOC}.ps ${DOC}.dvi

${DOC}.tar:
	tar cf ${.TARGET} ${SRCS}

# ------------------------------------------------------------------------
#
# Compress targets
#

#
# The list of compression extensions this Makefile knows about. If you
# add new compression schemes, add to this list (which is a list of
# extensions, hence bz2, *not* bzip2) and extend the _PROG_COMPRESS_*
# targets.
#
KNOWN_COMPRESS=	gz bz2 zip

#
# You can't build suffix rules to do compression, since you can't wildcard
# the source suffix. So these are defined .USE, to be tacked on as
# dependencies of the compress-* targets.
#

_PROG_COMPRESS_gz: .USE
	gzip -9 -c ${.ALLSRC} > ${.TARGET}

_PROG_COMPRESS_bz2: .USE
	bzip2 -9 -c ${.ALLSRC} > ${.TARGET}

_PROG_COMPRESS_zip: .USE
	zip -j -9 ${.TARGET} ${.ALLSRC}

#
# Build a list of targets for each compression scheme and output format.
# Don't compress the html-split output format.
#
.for _curformat in ${KNOWN_FORMATS}
_cf=${_curformat}
.for _curcompress in ${KNOWN_COMPRESS}
.if ${_cf} == "html-split"
${DOC}.${_cf}.tar.${_curcompress}: ${DOC}.${_cf}.tar _PROG_COMPRESS_${_curcompress}
.else
${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
.endif
.endfor
.endfor

#
# Install targets
#
# Build install-* targets, one per allowed value in FORMATS. Need to build
# two specific targets;
#
#    install-html-split - Handles multiple .html files being generated
#                         from one source. Uses the HTML.manifest file
#                         created by the stylesheets, which should list
#                         each .html file that's been created.
#
#    install-*          - Every other format. The wildcard expands to
#                         the other allowed formats, all of which should
#                         generate just one file.
#
# "beforeinstall" and "afterinstall" are hooks in to this process.
# Redefine them to do things before and after the files are installed,
# respectively.
#
install: beforeinstall realinstall afterinstall

#
# Build a list of install-format targets to be installed. These will be
# dependencies for the "realinstall" target.
#
.if empty(INSTALL_ONLY_COMPRESSED)
_curinst+= ${FORMATS:S/^/install-/g}
.endif

realinstall: ${_curinst}

.for _curformat in ${KNOWN_FORMATS}
_cf=${_curformat}
.if !target(install-${_cf})
.if ${_cf} == "html-split"
install-${_cf}: index.html
	@@if [ ! -f HTML.manifest ]; then				\
		echo "HTML.manifest file does not exist, can't install";\
		exit 1;							\
	fi
	${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} 	\
		`xargs < HTML.manifest` ${DESTDIR}${DOCDIR}/${VOLUME};	\
	if [ -f ${.OBJDIR}/${DOC}.ln ]; then 				\
		(cd ${DESTDIR}${DOCDIR}/${VOLUME}; 			\
		sh ${.OBJDIR}/${DOC}.ln); 				\
	fi
.for _compressext in ${KNOWN_COMPRESS}
install-${_cf}.tar.${_compressext}: ${DOC}.${_cf}.tar.${_compressext}
	${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}	\
		${.ALLSRC} ${DESTDIR}${DOCDIR}/${VOLUME}
.endfor
.else
install-${_cf}: ${DOC}.${_cf}
	${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}	\
		${.ALLSRC} ${DESTDIR}${DOCDIR}/${VOLUME}

.for _compressext in ${KNOWN_COMPRESS}
install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
	${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}	\
		${.ALLSRC} ${DESTDIR}${DOCDIR}/${VOLUME}
.endfor
.endif
.endif
.endfor

.for __target in beforeinstall afterinstall depend _SUBDIR
.if !target(${__target})
${__target}:
.endif
.endfor

#
# Distribution target
#
# Like "install", but places the files into the correct distribution
#
.if !target(distribute)
distribute:
.for dist in ${DISTRIBUTION}
	cd ${.CURDIR}; $(MAKE) install DESTDIR=${DISTDIR}/${dist}
.endfor
.endif

.include <bsd.dep.mk>
.include <bsd.obj.mk>
@


1.18
log
@Specify the "rtf-backend" or "tex-backend" options as appropriate.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.17 1999/03/27 16:03:49 nik Exp $
d31 1
a31 1
#    txt html html-split ps pdf rtf tar
d34 3
a36 1
# linked from one index.html file. 
d41 1
a41 1
FORMATS?= html-split
d120 1
a120 1
KNOWN_FORMATS= html html-split txt rtf ps pdf tex dvi tar
d167 4
d205 1
a205 4
.if ${_cf} == "html-split" 
_curinst+= install-html-split.tar.${_curcomp}
_docs+= ${DOC}.html-split.tar.${_curcomp}
.else 
@


1.17
log
@Turn the distribute: target back on.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.16 1999/03/22 22:16:23 nik Exp $
d240 1
a240 1
	${JADE} -ioutput.print ${JADEFLAGS} -d ${DSLPRINT} -t rtf ${DOC}.sgml
d243 1
a243 1
	${JADE} -ioutput.print ${JADEFLAGS} -d ${DSLPRINT} -t tex ${DOC}.sgml
@


1.16
log
@Finish the last commit, so that the html-split files are now properly
tar'ed and installed.  Prompted by JKH.

Turn 'distribute' in to a NOP, so that the LinuxDoc Handbook is not
smashed by this one during "make release".  We're almost ready to do
the switch. . .
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.15 1999/03/18 20:37:12 nik Exp $
a385 6
#.if !target(distribute)
#distribute:
#.for dist in ${DISTRIBUTION}
#	cd ${.CURDIR}; $(MAKE) install DESTDIR=${DISTDIR}/${dist}
#.endfor
#.endif
d388 3
a390 1
	@@echo "'distribute' not yet enabled for DocBook Handbook"
@


1.15
log
@Changes to support a new installation option.  If "html-split" is one of
the formats to build then "make install" can install a tar file of all
the HTML files.  Functionality required for the website.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.14 1999/03/12 22:24:07 nik Exp $
d199 4
d206 1
d357 1
a357 1
install-${_cf}.${_compressext}: ${DOC}.${_cf}.tar.${_compressext}
d386 6
d394 1
a394 3
.for dist in ${DISTRIBUTION}
	cd ${.CURDIR}; $(MAKE) install DESTDIR=${DISTDIR}/${dist}
.endfor
@


1.14
log
@Add a DISTRIBUTION variable so it knows where to install itself during a
"make distribute".
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.13 1999/03/08 21:44:45 nik Exp $
d53 1
a53 3
# compressed versions of built files. As a side effect, setting this option
# means the html-split format *will not* be installed, even if it's listed
# in ${FORMATS}, because it can not be compressed.
a197 1
.if ${_cf} != "html-split"
a202 1
.endif
d228 3
d245 1
a245 1
	@@echo "==> Tex pass 3/3"
a295 1
.if ${_cf} != "html-split"
d297 3
d301 1
a302 1
.endif
d351 5
@


1.13
log
@Add a "distribute" target, in preparation for getting "make release" to
work with the DocBook handbook. Currently untested. . .
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.12 1999/01/30 00:10:35 nik Exp $
d107 1
@


1.12
log
@* Add a new FORMAT, 'tar'. If it's used then ${SRC} is bundled up in to
  ${DOC}.tar. This honours the compression flags, so you can have it
  generate .gz, .zip, etc.

* Instead of only building compressed versions when running the "install"
  target they are now built for the "all" target as well.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.11 1999/01/27 23:39:47 nik Exp $
d368 12
@


1.11
log
@Add "-V html-manifest" to index.html target rules, so that it's only
generated for this target, and not the generic .html target as well.

Additional "-" before TeX and PDFTeX calls, which also return non-zero
status codes (almost called them errorlevels, how long since I last wrote
a .bat file?)
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.10 1999/01/25 22:00:40 nik Exp $
d31 1
a31 1
#    txt html html-split ps pdf rtf
d119 1
a119 1
KNOWN_FORMATS= html html-split txt rtf ps pdf tex dvi
d184 3
d188 17
a204 3
.if !empty(INSTALL_COMPRESSED) && ${_cf} != "html-split"
_clean:= ${CLEANFILES} ${INSTALL_COMPRESSED:S/^/${DOC}.${_cf}.&/}
CLEANFILES:= ${_clean}
d207 1
d259 3
a322 15

#
# Build a list of install-format-compress_format targets to be installed.
# These will be dependecies for the "realinstall" target.
#
.if !empty(INSTALL_COMPRESSED)
.for _curformat in ${FORMATS}
_cf=${_curformat}
.if ${_cf} != "html-split"
.for _curcomp in ${INSTALL_COMPRESSED}
_curinst+= install-${_curformat}.${_curcomp}
.endfor
.endif
.endfor
.endif
@


1.10
log
@Currently the first two calls to tex return a non-zero status code. This
is expected, so prefix them with "-" so make(1) ignores it.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.9 1999/01/25 21:58:47 nik Exp $
d206 1
a206 1
	${JADE} -ioutput.html ${JADEFLAGS} -d ${DSLHTML} -t sgml ${DOC}.sgml
d228 1
a228 1
	tex "&jadetex" ${DOC}.tex
d232 1
a232 1
	pdftex "&pdfjadetex" ${DOC}.tex
d234 1
a234 1
	pdftex "&pdfjadetex" ${DOC}.tex
d338 1
a338 1
		`xargs < HTML.manifest` ${DESTDIR}${DOCDIR}/${VOLUME};
@


1.9
log
@Move doc/sgml/* to doc/share/sgml/*, so it better follows the layout of
Doc. Proj. related ports under $PREFIX/share. Update en/handbook/Makefile
with the new paths.

Didn't seem worthwhile to do a repository copy for only three files moved.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.8 1999/01/03 21:19:03 nik Exp $
d224 1
a224 1
	tex "&jadetex" ${DOC}.tex
d226 1
a226 1
	tex "&jadetex" ${DOC}.tex
@


1.8
log
@Extra support in the Makefile. Now builds html, html-split, rtf, ps, and pdf
versions (modulo bugs in JadeTex). "make install" and "make clean" now also
seem to do the right thing.

Extensive documentation included, comments welcomed.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.5 1998/11/12 01:20:35 nik Exp $
d109 2
a110 2
DSLHTML=	../../sgml/freebsd.dsl
DSLPRINT=	../../sgml/freebsd.dsl
d112 1
a112 1
FREEBSDCATALOG= ../../sgml/catalog
@


1.7
log
@Added output.html and output.print as parameter entities to freebsd.dtd.
Default to "IGNORE", you should set them to "INCLUDE" by whatever
mechanism your SGML parser supports as necessary (i.e., Jade's -i
flag).

Added redefinitions for some ISO entities that aren't understood by
most web browsers. Since this is for HTML output only, wrap it in a
%output.html; marked section.

Use these marked sections to put both print and HTML stylesheets in one
.dsl file (freebsd.dsl). The print stylesheet now understands about the
elements that have been added to DocBook (and won't try and render them
in red).

Updated Makefile to use output.html and output.print on the command
line to Jade, instead of the earlier "html" and "print.

Note: producing .tex (and thence .ps and .pdf) versions of the Handbook
is broken. The Handbook tickles several bugs in the JadeTeX macros.
Sebastian Rahz, the JadeTeX author, knows about this, and is working on
fixing them.
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.6 1998/12/10 20:42:26 nik Exp $
d17 2
d31 1
a31 1
#    ascii html html-chunk tex dvi ps pdf rtf
d33 2
a34 2
# html-chunk is the file as one large HTML file, rather than broken up
# into smaller files
d39 19
a57 1
FORMATS?=  html
d101 7
d110 1
a110 1
DSLPRINT=	/usr/local/share/sgml/docbook/dsssl/modular/print/docbook.dsl
d119 2
d130 30
d163 4
a166 4
.if ${_cf} == "html"
_docs+= index.html
CLEANFILES+= *.html HTML.manifest
.elif ${_cf} == "html-chunk"
d169 1
a169 1
.elif ${_cf} == "ascii"
d181 7
a187 3
.else
_docs+= ${DOC}.${_curformat}
CLEANFILES+= ${DOC}.${_curformat}
d193 2
a194 1
# Build some targets
a195 1
# ------------------------------------------------------------------------
d197 1
a197 1
# Targets
d205 1
a205 1
index.html: ${SRCS}
d207 1
a207 1
	tidy -i -m -f /dev/null *.html
d211 1
a211 1
	tidy -i -m -f /dev/null ${DOC}.html
d224 1
a224 1
	-tex "&jadetex" ${DOC}.tex
d226 1
a226 1
	-tex "&jadetex" ${DOC}.tex
d228 1
a228 1
	-tex "&jadetex" ${DOC}.tex
d232 1
a232 1
	-pdftex "&pdfjadetex" ${DOC}.tex
d234 1
a234 1
	-pdftex "&pdfjadetex" ${DOC}.tex
d236 1
a236 1
	-pdftex "&pdfjadetex" ${DOC}.tex
d240 122
@


1.6
log
@Support making multiple output formats from the Handbook (RTF, HTML,
Text, PS, PDF)
@
text
@d2 1
a2 1
# $Id: Makefile,v 1.5 1998/11/12 01:20:35 nik Exp $
d143 1
a143 2
	${JADE} -ihtml ${JADEFLAGS} -d ${DSLHTML} -t sgml ${DOC}.sgml
	./conv.pl *.html
d147 1
a147 2
	${JADE} -ihtml -V nochunks ${JADEFLAGS} -d ${DSLHTML} -t sgml ${DOC}.sgml > ${DOC}.html
	./conv.pl ${DOC}.html
d154 1
a154 1
	${JADE} -iprint ${JADEFLAGS} -d ${DSLPRINT} -t rtf ${DOC}.sgml
d157 1
a157 1
	${JADE} -iprint ${JADEFLAGS} -d ${DSLPRINT} -t tex ${DOC}.sgml
@


1.5
log
@The beginnings of a friendlier Makefile. Doesn't do much except let you
build the HTML and RTF formats.
@
text
@d2 1
a2 1
# $Id$
d23 1
a23 1
DOC?= ${.CURDIR:T}
d29 1
a29 1
#    ascii html ps pdf rtf
d31 7
a37 1
FORMATS=  html
d40 1
a40 1
# SRCS lists the individual SGML files that make up the Handbook. Changes
d77 3
a79 2
SRCS+= authors.ent chapters.ent mailing-lists.ent

d90 1
a90 1
JADEFLAGS?=	-c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG}
d107 15
d143 1
a143 1
	${JADE} ${JADEFLAGS} -d ${DSLHTML} -t sgml handbook.sgml
d145 9
d156 1
a156 1
	${JADE} ${JADEFLAGS} -d ${DSLPRINT} -t rtf handbook.sgml
d159 20
a178 1
	${JADE} ${JADEFLAGS} -d ${DSLPRINT} -t tex handbook.sgml
@


1.4
log
@As per chapter 18 of the handbook (which I should know back to front by now)
formally list myself as MAINTAINER.
@
text
@d1 2
a2 25
# Makefile to build the Handbook from DocBook source.
#
# Requires these ports from textproc
#
#    docbook
#    dsssl-docbook-modular
#    html
#    jade
#
# and probably one or two others. You can probably get everything you need
# with the new textproc/docproj meta-port. 
#
# Note that you need version 1.08 of dsssl-docbook-modular. In version 1.07
# the 'catalog' file is called 'CATALOG', and you will need to change the 
# definition below.
#
# THIS IS A QUICK HACK (!) so that others can get an idea of how the 
# Handbook will look after conversion. After typing "make", point your
# browser at book01.html and read on. This is still very much a work in
# progress, and the final formatting will be considerably different.
#
# Eventually I expect most of this will be folded back into bsd.sgml.mk.
#
# Any comments or suggestions about the conversion process should be sent
# to nik@@FreeBSD.ORG
d4 10
d17 67
a83 1
DOCS=	handbook.sgml
d87 18
a104 2
# Transformation rules
#
d106 1
a106 1
# file.sgml --> file.html
d108 1
a108 33
# Examines file.sgml to determine the DTD in use. The DTD determines how
# the file will be converted to HTML. 

.SUFFIXES:	.sgml .html
SGMLNORM?=	/usr/local/bin/sgmlnorm
HTMLCATALOG?=	/usr/local/share/sgml/html/catalog
SGMLNORMFLAGS=	-d -n -c ${HTMLCATALOG}

JADE?=		/usr/local/bin/jade
DSL?=           ../../sgml/freebsd.dsl
FREEBSDCATALOG?=../../sgml/catalog
DOCBOOKCATALOG?=/usr/local/share/sgml/docbook/3.0/catalog
JADECATALOG?=	/usr/local/share/sgml/jade/catalog
DSSSLCATALOG?=  /usr/local/share/sgml/docbook/dsssl/modular/catalog
JADEFLAGS?=	-c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} -d ${DSL} -t sgml

.sgml.html:
	@@DTD=`head -n 1 ${.IMPSRC} | perl -ne '/DTD (\w+)/; print $$1;'`;  \
	echo "${.IMPSRC} ($$DTD) --> ${.TARGET}";			\
	case $$DTD in							\
		HTML)							\
			${SGMLNORM} ${SGMLNORMFLAGS}			\
				${.IMPSRC} > ${.TARGET}; 		\
			;;						\
		DocBook)						\
			${JADE} ${JADEFLAGS} ${.IMPSRC};		\
			;;						\
		*)							\
			echo "Don't know how to process $$DTD."		\
			;;						\
	esac

#	${SGMLNORM} ${SGMLNORMFLAGS} ${.IMPSRC} > ${.TARGET}
d118 11
a128 4
#
# Build everything. Never completes, because handbook.html is never built
#
all: handbook.html
d130 2
@


1.3
log
@Use the new freebsd.dsl file when converting the Handbook.
@
text
@d28 2
@


1.2
log
@Use the new FreeBSD Doc. Project DTD.
@
text
@d10 6
a15 1
# and probably one or two others.
d19 1
a19 1
# browser at book01.htm and read on. This is still very much a work in
d46 1
a46 1
DSL?=		/usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl
d50 2
a51 1
JADEFLAGS?=	-c ${FREEBSDCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} -d ${DSL} -t sgml
a62 1
			mv ARTICLE-0001.html ${.TARGET};		\
@


1.1
log
@A quick hack to build the HTML version of the DocBook handbook -- partly
so I can check my progress, partly so that others can offer comments on
the result of the conversion.

See <URL:http://www.freebsd.org/~nik/handbook/book01.htm> for the first
results. Keep in mind that the conversion has not been fine tuned in any
way. That said, comments are welcome.
@
text
@d42 1
d45 1
a45 1
JADEFLAGS?=	-c ${DOCBOOKCATALOG} -c ${JADECATALOG} -d ${DSL} -t sgml
@
