aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2013-02-01 09:18:30 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2013-02-01 09:18:30 +0000
commit9162098876d03248ffd1f51600efbd5d4b55aaaa (patch)
tree3dc757e03c9ba925891745a69ec7868b0347930f
parentaf7381742b95a92cd69ad77de0da6fc03219e207 (diff)
downloaddoc-9162098876d03248ffd1f51600efbd5d4b55aaaa.tar.gz
doc-9162098876d03248ffd1f51600efbd5d4b55aaaa.zip
- Parse the documents with XML tools before passing them to Jade and turn off
Jade validation. This will let us keep using Jade for printed output rendering and dropping old SGML constructs at the same time.
Notes
Notes: svn path=/projects/xml-tools/; revision=40849
-rw-r--r--share/mk/doc.docbook.mk19
1 files changed, 12 insertions, 7 deletions
diff --git a/share/mk/doc.docbook.mk b/share/mk/doc.docbook.mk
index bae8e4222d..90d8f2863a 100644
--- a/share/mk/doc.docbook.mk
+++ b/share/mk/doc.docbook.mk
@@ -170,7 +170,7 @@ CATALOGS+= -c ${c}
.endif
.endfor
SGMLFLAGS+= -D ${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T} -D ${CANONICALOBJDIR}
-JADEOPTS= ${JADEFLAGS} ${SGMLFLAGS} ${CATALOGS}
+JADEOPTS= -w no-valid ${JADEFLAGS} ${SGMLFLAGS}
XSLTPROCOPTS= ${XSLTPROCFLAGS}
KNOWN_FORMATS= html html.tar html-split html-split.tar \
@@ -377,14 +377,14 @@ CLEANFILES+= ${DOC}.aux ${DOC}.log
.elif ${_cf} == "ps"
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.out ${DOC}.tex-ps \
- ${DOC}.tex ${DOC}.tex-tmp ${DOC}.fo
+ ${DOC}.tex ${DOC}.tex-tmp ${DOC}.fo ${DOC}.parsed.xml
.for _curimage in ${LOCAL_IMAGES_EPS:M*share*}
CLEANFILES+= ${_curimage:T} ${_curimage:H:T}/${_curimage:T}
.endfor
.elif ${_cf} == "pdf"
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.out ${DOC}.tex-pdf ${DOC}.tex-pdf-tmp \
- ${DOC}.tex ${DOC}.fo
+ ${DOC}.tex ${DOC}.fo ${DOC}.parsed.xml
.for _curimage in ${IMAGES_PDF:M*share*}
CLEANFILES+= ${_curimage:T} ${_curimage:H:T}/${_curimage:T}
.endfor
@@ -572,6 +572,10 @@ ${DOC}.rtf:
# PS/PDF -----------------------------------------------------------------
.if ${PDFENGINE} == "jade"
+
+${DOC}.parsed.xml: ${SRCS}
+ ${XMLLINT} --catalogs --nonet --noent --valid --dropdtd ${MASTERDOC} > ${.TARGET}
+
.if !defined(NO_TEX)
#
# This sucks, but there's no way round it. The PS and PDF formats need
@@ -581,22 +585,23 @@ ${DOC}.rtf:
#
${DOC}.tex: ${SRCS} ${LOCAL_IMAGES_EPS} ${PRINT_INDEX} \
- ${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_EN}
+ ${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_EN} \
+ ${DOC}.parsed.xml
${GEN_INDEX_SGML_CMD}
${JADE_CMD} -V tex-backend ${PRINTOPTS} \
- ${JADEOPTS} -t tex -o ${.TARGET} ${XMLDECL} ${MASTERDOC}
+ ${JADEOPTS} -t tex -o ${.TARGET} ${XMLDECL} ${DOC}.parsed.xml
${DOC}.tex-ps: ${DOC}.tex
${LN} -f ${.ALLSRC} ${.TARGET}
.if !target(${DOC}.tex-pdf)
${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${PRINT_INDEX} \
- ${LOCAL_IMAGES_TXT}
+ ${LOCAL_IMAGES_TXT} ${DOC}.parsed.xml
${GEN_INDEX_SGML_CMD}
${RM} -f ${.TARGET}
${CAT} ${PDFTEX_DEF} > ${.TARGET}
${JADE_CMD} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
- ${JADEOPTS} -t tex -o /dev/stdout ${XMLDECL} ${MASTERDOC} >> ${.TARGET}
+ ${JADEOPTS} -t tex -o /dev/stdout ${XMLDECL} ${DOC}.parsed.xml >> ${.TARGET}
.endif
.if !target(${DOC}.dvi)