doc: Force FOP to read images from doc directory
[fw/altos] / doc / Makefile
index 2887a229465242fa1ccd094f9499ec66e2c6fc61..9d4d68c6e18ff70108fa6a34181fb458f75c4fc7 100644 (file)
@@ -18,7 +18,8 @@ RELNOTES=\
        release-notes-1.4.html \
        release-notes-1.4.1.html \
        release-notes-1.5.html \
-       release-notes-1.6.html
+       release-notes-1.6.html \
+       release-notes-1.6.1.html
 
 PICTURES=\
        altosui.png \
@@ -51,6 +52,7 @@ PICTURES=\
        micropeak-statistics.png \
        MicroPeakUSB-2.0-inuse.jpg \
        MicroPeakUSB-2.0.jpg \
+       monitor-idle.png \
        scan-channels.png \
        site-map.png \
        table.png \
@@ -72,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)
@@ -85,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
@@ -114,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>') > $@
+