aboutsummaryrefslogtreecommitdiff
path: root/share/mk
diff options
context:
space:
mode:
authorMurray Stokely <murray@FreeBSD.org>2004-09-04 19:17:35 +0000
committerMurray Stokely <murray@FreeBSD.org>2004-09-04 19:17:35 +0000
commit30830727e5cb585cefe56cf8f226bd15c0e6aeb1 (patch)
tree368b34f4cecc5e60866d6eb22c4ce51e09ebc2b2 /share/mk
parent710862d3d082c76773efb27a0a88ce8f748c4eeb (diff)
downloaddoc-30830727e5cb585cefe56cf8f226bd15c0e6aeb1.tar.gz
doc-30830727e5cb585cefe56cf8f226bd15c0e6aeb1.zip
Add support for using FOP or XEP as an XSL-FO backend via USE_* make
variables. PassiveTeX is pretty limited and so the other formatters give the stylesheets more functionality to create nice slides.
Notes
Notes: svn path=/head/; revision=22239
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/doc.project.mk2
-rw-r--r--share/mk/doc.slides.mk19
2 files changed, 18 insertions, 3 deletions
diff --git a/share/mk/doc.project.mk b/share/mk/doc.project.mk
index 1640cea5ae..b76639ff48 100644
--- a/share/mk/doc.project.mk
+++ b/share/mk/doc.project.mk
@@ -98,6 +98,8 @@ LATEX_CMD?= ${PREFIX}/bin/latex
PDFTEX_CMD?= ${PREFIX}/bin/pdftex
JADETEX_CMD?= ${TEX_CMD} "&jadetex"
PDFJADETEX_CMD?=${PDFTEX_CMD} "&pdfjadetex"
+FOP_CMD?= ${PREFIX}/share/fop/fop.sh
+XEP_CMD?= sh ${HOME}/XEP/xep.sh
# Image processing (contains code used by the doc.<format>.mk files, so must
# be listed first).
diff --git a/share/mk/doc.slides.mk b/share/mk/doc.slides.mk
index 54bdfd7b11..38ec06e2e5 100644
--- a/share/mk/doc.slides.mk
+++ b/share/mk/doc.slides.mk
@@ -32,7 +32,7 @@ CSS_SHEET?=
SLIDES_XSLDIR= /usr/local/share/xsl/slides/xsl/
SLIDES_XSLHTML= ${SLIDES_XSLDIR}xhtml/default.xsl
-SLIDES_XSLPRINT= ${SLIDES_XSLDIR}fo/plain.xsl
+SLIDES_XSLPRINT?= ${SLIDES_XSLDIR}fo/plain.xsl
# Loop through formats we should build.
.for _curformat in ${FORMATS}
@@ -45,11 +45,16 @@ _docs+= ${DOC}.${_curformat}
CLEANFILES+= ${DOC}.${_curformat}
.if ${_cf} == "pdf"
-CLEANFILES+= ${DOC}.fo ${DOC}.aux ${DOC}.log ${DOC}.out ${DOC}.pdf texput.log
+CLEANFILES+= ${DOC}.fo ${DOC}.pdf
+.if ! defined (USE_FOP) && ! defined (USE_XEP)
+CLEANFILES+= ${DOC}.aux ${DOC}.log ${DOC}.out texput.log
+.endif
.endif
.endfor
+XSLTPROCFLAGS?= --nonet
+XSLTPROCOPTS= ${XSLTPROCFLAGS}
.MAIN: all
@@ -58,6 +63,14 @@ all: ${_docs}
${DOC}.html: ${SRCS}
${XSLTPROC} ${XSLTPROCOPTS} ${SLIDES_XSLHTML} ${.ALLSRC}
-${DOC}.pdf: ${SRCS}
+${DOC}.fo: ${SRCS}
${XSLTPROC} ${XSLTPROCOPTS} ${SLIDES_XSLPRINT} ${.ALLSRC} > ${.TARGET:S/.pdf$/.fo/}
+
+${DOC}.pdf: ${DOC}.fo
+.if defined(USE_FOP)
+ ${FOP_CMD} ${.TARGET:S/.pdf$/.fo/} ${.TARGET}
+.elif defined(USE_XEP)
+ ${XEP_CMD} ${.TARGET:S/.pdf$/.fo/} ${.TARGET}
+.else
${PDFTEX_CMD} --interaction nonstopmode "&pdfxmltex" ${.TARGET:S/.pdf$/.fo/}
+.endif