summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-10-13 13:52:32 -0700
committerKeith Packard <keithp@keithp.com>2015-10-13 13:54:28 -0700
commitc1ca80318102af122cb7b5380331e37795280761 (patch)
tree57571256e00e01692109307992eb35755d5917b9
parent0ae116dd8779fd0594d443a735e7b6834ea9b713 (diff)
doc: Force FOP to read images from doc directory
Looks like something changed and fop is now reading from the directory containing the source file. xmlto places that source in /tmp, making all relative URIs fail. Fix this by creating a fop configuration file directing it to load relative to the doc directory and then pass that through xmlto. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--doc/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 9c6189b4..9d4d68c6 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -74,6 +74,7 @@ PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf telegps.
telemetrum-outline.pdf telemega-outline.pdf easymini-outline.pdf easymega-outline.pdf
HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
FOSTYLE=xorg-fo.xsl
+FOPCFG=fop-cfg.xml
TEMPLATES=titlepage.templates.xsl
PDFSTYLE=
IMAGES=$(PICTURES) $(SVG)
@@ -87,7 +88,7 @@ XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
xsltproc $(XSLTFLAGS) -o $@ $(HTMLSTYLE) $*.xsl
.xsl.pdf:
- xmlto -x $(FOSTYLE) --with-fop pdf $*.xsl
+ xmlto -p '-c $(FOPCFG)' --searchpath `pwd` -x $(FOSTYLE) --with-fop pdf $*.xsl
.xml.xsl:
xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.xml
@@ -116,8 +117,11 @@ altusmetrum.pdf: $(RELNOTES_XSL) $(IMAGES)
telegps.html: $(RELNOTES_XSL) $(IMAGES)
telegps.pdf: $(RELNOTES_XSL) $(IMAGES)
-$(PDF): $(FOSTYLE) $(TEMPLATES)
+$(PDF): $(FOSTYLE) $(TEMPLATES) $(FOPCFG)
indent: altusmetrum.xsl
xmlindent -i 2 < altusmetrum.xsl > altusmetrum.new
+$(FOPCFG): Makefile
+ (echo '<fop version="1.0">'; echo ' <base>'"`pwd`"'</base>'; echo '</fop>') > $@
+