diff options
author | Nik Clayton <nik@FreeBSD.org> | 2001-02-22 15:42:41 +0000 |
---|---|---|
committer | Nik Clayton <nik@FreeBSD.org> | 2001-02-22 15:42:41 +0000 |
commit | fc20bd6c535e12df92c2295fc957c454fd077edb (patch) | |
tree | ba24c2cd4f5d6bc7ad80ea11684296ebe66beb2d /share | |
parent | 62fda2a5e3bf76c8aed45a147e7c17749e034120 (diff) | |
download | doc-fc20bd6c535e12df92c2295fc957c454fd077edb.tar.gz doc-fc20bd6c535e12df92c2295fc957c454fd077edb.zip |
1. Add a new knob, GEN_INDEX. If defined (nothing does yet), collateindex.pl
will be run to generate index.sgml, an automatically generated index for
the document. This is also added to the list of dependencies.
2. Add a DOCBOOKSUFFIX variable, defaulting to "sgml", so we can write
MASTERDOC?= ${.CURDIR}/${DOC}.${DOCBOOKSUFFIX}
Requested by: Michael Wiedmann <mw@miwie.in-berlin.de>
Linux Documentation Project
3. Set the DSSSL 'openjade' variable to #t if we're processing with
OpenJade.
4. Work around a bug in the stylesheets. If we split the <legalnotice>
out in to a separate file it isn't added to the HTML.manifest. Check
for it by hand, and include it if necessary.
Notes
Notes:
svn path=/head/; revision=8823
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/doc.docbook.mk | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/share/mk/doc.docbook.mk b/share/mk/doc.docbook.mk index a7d56bc221..180fe94f12 100644 --- a/share/mk/doc.docbook.mk +++ b/share/mk/doc.docbook.mk @@ -1,5 +1,5 @@ # -# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.24 2000/10/29 18:01:54 nik Exp $ +# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.25 2000/10/31 14:39:13 kuriyama Exp $ # # This include file <doc.docbook.mk> handles building and installing of # DocBook documentation in the FreeBSD Documentation Project. @@ -42,10 +42,16 @@ # # NO_TIDY If you do not want to use tidy, set this to "YES". # +# GEN_INDEX If defined, index.sgml will be added to the list +# of dependencies for source files, and collateindex.pl +# will be run to generate index.sgml. +# # Documents should use the += format to access these. # -MASTERDOC?= ${.CURDIR}/${DOC}.sgml +DOCBOOKSUFFIX?= sgml + +MASTERDOC?= ${.CURDIR}/${DOC}.${DOCBOOKSUFFIX} .if !defined(OPENJADE) JADE?= ${PREFIX}/bin/jade @@ -55,6 +61,7 @@ NSGMLS?= ${PREFIX}/bin/nsgmls JADE?= ${PREFIX}/bin/openjade JADECATALOG?= ${PREFIX}/share/sgml/openjade/catalog NSGMLS?= ${PREFIX}/bin/onsgmls +JADEFLAGS+= -V openjade .endif DSLHTML?= ${DOC_PREFIX}/share/sgml/default.dsl @@ -116,11 +123,11 @@ KNOWN_FORMATS= html html.tar html-split html-split.tar txt rtf ps pdf tex dvi ta .for _curformat in ${FORMATS} _cf=${_curformat} .if ${_cf} == "html-split" -_docs+= index.html HTML.manifest -CLEANFILES+= `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manifest +_docs+= index.html HTML.manifest ln*.html +CLEANFILES+= `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manifest ln*.html .elif ${_cf} == "html-split.tar" _docs+= ${DOC}.html-split.tar -CLEANFILES+= `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manifest +CLEANFILES+= `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manifest ln*.html CLEANFILES+= ${DOC}.html-split.tar .elif ${_cf} == "html" _docs+= ${DOC}.html @@ -148,10 +155,14 @@ _docs+= ${DOC}.tar CLEANFILES+= ${DOC}.tar .elif ${_cf} == "pdb" _docs+= ${DOC}.pdb ${.CURDIR:T}.pdb -+CLEANFILES+= ${DOC}.pdb ${.CURDIR:T}.pdb +CLEANFILES+= ${DOC}.pdb ${.CURDIR:T}.pdb .endif .endfor +.if defined(GEN_INDEX) +CLEANFILES+=HTML.index +.endif + # # Build a list of install-${format}.${compress_format} targets to be # by "make install". Also, add ${DOC}.${format}.${compress_format} to @@ -181,12 +192,20 @@ LOCAL_IMAGES_LIB += ${LOCAL_IMAGES_LIB_DIR}/${_curimage} all: ${_docs} index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} +.if defined(GEN_INDEX) + ${JADE} -V html-index -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} + perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -o index.sgml HTML.index +.endif ${JADE} -V html-manifest -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} .if !defined(NO_TIDY) -tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest` .endif ${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} +.if defined(GEN_INDEX) + ${JADE} -V html-index -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} + perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -o index.sgml HTML.index +.endif ${JADE} -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > ${.TARGET} || (rm -f ${.TARGET} && false) .if !defined(NO_TIDY) -tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET} @@ -349,6 +368,9 @@ _cf=${_curformat} install-${_cf}: index.html @[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR} ${INSTALL_DOCS} `xargs < HTML.manifest` ${DESTDIR} + @if [ -f ln*.html ]; then \ + ${INSTALL_DOCS} ln*.html ${DESTDIR}; \ + fi @if [ -f ${.OBJDIR}/${DOC}.ln ]; then \ (cd ${DESTDIR}; sh ${.OBJDIR}/${DOC}.ln); \ fi |