svn commit: r40849 - projects/xml-tools/share/mk
Gabor Kovesdan
gabor at FreeBSD.org
Fri Feb 1 09:18:31 UTC 2013
Author: gabor
Date: Fri Feb 1 09:18:30 2013
New Revision: 40849
URL: http://svnweb.freebsd.org/changeset/doc/40849
Log:
- 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.
Modified:
projects/xml-tools/share/mk/doc.docbook.mk
Modified: projects/xml-tools/share/mk/doc.docbook.mk
==============================================================================
--- projects/xml-tools/share/mk/doc.docbook.mk Fri Feb 1 09:03:01 2013 (r40848)
+++ projects/xml-tools/share/mk/doc.docbook.mk Fri Feb 1 09:18:30 2013 (r40849)
@@ -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)
More information about the svn-doc-projects
mailing list