summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-05-14 22:45:30 +0200
committerMark Wielaard <mark@klomp.org>2020-05-15 00:44:52 +0200
commitd2a228b88ee046e37edce2ed54a14ef0c294842a (patch)
treea70e47d213775eabebe37903919b3fc45db62a1e
parentRun xmllint on make check. (diff)
downloadvalgrind-docs.tar.gz
valgrind-docs.tar.bz2
valgrind-docs.tar.xz
Move to xmlto with fop for print-docs.docs
Default to using fop for pdf genration. pdfxmltex is known to be broken by default. xmlto can also use pdfxmltex or dblatex if available.
-rw-r--r--docs/Makefile.am31
1 files changed, 17 insertions, 14 deletions
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 931caf6..4a7e3d9 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -9,6 +9,12 @@
9# you need to re-run autogen.sh and configure to make it take effect. 9# you need to re-run autogen.sh and configure to make it take effect.
10BUILD_ALL_DOCS=yes 10BUILD_ALL_DOCS=yes
11 11
12# Whether to run xmlto pdf --with-fop
13# This is de fault, set to empty to use the default fo to pdf
14# processor that xmlto uses (which might be pdfxmltex, which is
15# known to be broken).
16WITH_FOP=--with-fop
17
12##------------------------------------------------------------- 18##-------------------------------------------------------------
13## END OF HACK 19## END OF HACK
14##------------------------------------------------------------- 20##-------------------------------------------------------------
@@ -182,14 +188,12 @@ print-docs:
182 mkdir -p $(myprintdir) && \ 188 mkdir -p $(myprintdir) && \
183 mkdir -p $(myprintdir)/images && \ 189 mkdir -p $(myprintdir)/images && \
184 cp $(myimgdir)/*.png $(myprintdir)/images && \ 190 cp $(myimgdir)/*.png $(myprintdir)/images && \
185 $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(myprintdir)/index.fo $(XSL_FO_STYLE) $(myxmldir)/index.xml && \ 191 xmlto -v $(WITH_FOP) --stringparam=keep.relative.image.uris="1" \
186 (cd $(myprintdir) && \ 192 --searchpath print pdf $(myxmldir)/index.xml &> $(LOGFILE) && \
187 ( pdfxmltex index.fo && \ 193 echo "Generating PS file: $(myprintdir)/index.ps ..." && \
188 pdfxmltex index.fo && \ 194 pdftops index.pdf && \
189 pdfxmltex index.fo ) &> $(LOGFILE) < /dev/null && \ 195 mv index.pdf index.ps $(myprintdir) && \
190 echo "Generating PS file: $(myprintdir)/index.ps ..." && \ 196 rm $(LOGFILE)
191 pdftops index.pdf && \
192 rm -f *.log *.aux *.fo *.out)
193 197
194# If the docs have been built, install them. But don't worry if they have 198# If the docs have been built, install them. But don't worry if they have
195# not -- developers do 'make install' not from a 'make dist'-ified distro all 199# not -- developers do 'make install' not from a 'make dist'-ified distro all
@@ -295,11 +299,10 @@ download-docs:
295 @echo "Generating valgrind_manual.pdf ..." 299 @echo "Generating valgrind_manual.pdf ..."
296 mkdir -p $(vgdir)/print 300 mkdir -p $(vgdir)/print
297 mkdir -p $(vgdir)/print/images 301 mkdir -p $(vgdir)/print/images
298 $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(vgdir)/print/manual.fo $(XSL_FO_STYLE) $(myxmldir)/index.xml 302 cp $(myimgdir)/*.png $(vgdir)/print/images/
299 (cd $(vgdir)/print/ && \ 303 xmlto -v $(WITH_FOP) --stringparam=keep.relative.image.uris="1" \
300 ( pdfxmltex manual.fo && \ 304 --searchpath print pdf $(myxmldir)/index.xml &> $(LOGFILE)
301 pdfxmltex manual.fo && \ 305 mv index.pdf $(vgdir)/print/manual.pdf
302 pdfxmltex manual.fo ) &> $(LOGFILE) < /dev/null )
303 @echo "" 306 @echo ""
304 @echo "Generating valgrind_manual.ps.bz2 ..." 307 @echo "Generating valgrind_manual.ps.bz2 ..."
305 (cd $(vgdir)/print/ && \ 308 (cd $(vgdir)/print/ && \
@@ -307,4 +310,4 @@ download-docs:
307 mv $(vgdir)/print/manual.pdf $(downloadsdir)/valgrind_manual.pdf 310 mv $(vgdir)/print/manual.pdf $(downloadsdir)/valgrind_manual.pdf
308 mv $(vgdir)/print/manual.ps $(downloadsdir)/valgrind_manual.ps 311 mv $(vgdir)/print/manual.ps $(downloadsdir)/valgrind_manual.ps
309 bzip2 $(downloadsdir)/valgrind_manual.ps 312 bzip2 $(downloadsdir)/valgrind_manual.ps
310 /bin/rm -fr $(vgdir) 313 /bin/rm -fr $(vgdir) $(LOGFILE)