|
From: Mark W. <ma...@so...> - 2020-05-14 23:13:26
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5f4a5783aa24b549c088f7409846898012fe15f1 commit 5f4a5783aa24b549c088f7409846898012fe15f1 Author: Mark Wielaard <ma...@kl...> Date: Thu May 14 22:45:30 2020 +0200 Move to xmlto with fop for print-docs. Default to using fop for pdf generation. pdfxmltex is known to be broken by default. xmlto can also use pdfxmltex or dblatex if available. Diff: --- docs/Makefile.am | 31 +++++++++++++++++-------------- docs/README | 11 +++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 931caf6be9..4a7e3d9870 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -9,6 +9,12 @@ # you need to re-run autogen.sh and configure to make it take effect. BUILD_ALL_DOCS=yes +# Whether to run xmlto pdf --with-fop +# This is de fault, set to empty to use the default fo to pdf +# processor that xmlto uses (which might be pdfxmltex, which is +# known to be broken). +WITH_FOP=--with-fop + ##------------------------------------------------------------- ## END OF HACK ##------------------------------------------------------------- @@ -182,14 +188,12 @@ print-docs: mkdir -p $(myprintdir) && \ mkdir -p $(myprintdir)/images && \ cp $(myimgdir)/*.png $(myprintdir)/images && \ - $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(myprintdir)/index.fo $(XSL_FO_STYLE) $(myxmldir)/index.xml && \ - (cd $(myprintdir) && \ - ( pdfxmltex index.fo && \ - pdfxmltex index.fo && \ - pdfxmltex index.fo ) &> $(LOGFILE) < /dev/null && \ - echo "Generating PS file: $(myprintdir)/index.ps ..." && \ - pdftops index.pdf && \ - rm -f *.log *.aux *.fo *.out) + xmlto -v $(WITH_FOP) --stringparam=keep.relative.image.uris="1" \ + --searchpath print pdf $(myxmldir)/index.xml &> $(LOGFILE) && \ + echo "Generating PS file: $(myprintdir)/index.ps ..." && \ + pdftops index.pdf && \ + mv index.pdf index.ps $(myprintdir) && \ + rm $(LOGFILE) # If the docs have been built, install them. But don't worry if they have # not -- developers do 'make install' not from a 'make dist'-ified distro all @@ -295,11 +299,10 @@ download-docs: @echo "Generating valgrind_manual.pdf ..." mkdir -p $(vgdir)/print mkdir -p $(vgdir)/print/images - $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(vgdir)/print/manual.fo $(XSL_FO_STYLE) $(myxmldir)/index.xml - (cd $(vgdir)/print/ && \ - ( pdfxmltex manual.fo && \ - pdfxmltex manual.fo && \ - pdfxmltex manual.fo ) &> $(LOGFILE) < /dev/null ) + cp $(myimgdir)/*.png $(vgdir)/print/images/ + xmlto -v $(WITH_FOP) --stringparam=keep.relative.image.uris="1" \ + --searchpath print pdf $(myxmldir)/index.xml &> $(LOGFILE) + mv index.pdf $(vgdir)/print/manual.pdf @echo "" @echo "Generating valgrind_manual.ps.bz2 ..." (cd $(vgdir)/print/ && \ @@ -307,4 +310,4 @@ download-docs: mv $(vgdir)/print/manual.pdf $(downloadsdir)/valgrind_manual.pdf mv $(vgdir)/print/manual.ps $(downloadsdir)/valgrind_manual.ps bzip2 $(downloadsdir)/valgrind_manual.ps - /bin/rm -fr $(vgdir) + /bin/rm -fr $(vgdir) $(LOGFILE) diff --git a/docs/README b/docs/README index 76245b5164..482fe82777 100644 --- a/docs/README +++ b/docs/README @@ -83,6 +83,17 @@ from the XML source at various times on various Linux distros. They're mostly about the PDF/PS documents, because they are the hardest to build. +Notes [May 2020] +---------------- + +The default pdf generation has switched to xmlto using fop. +Make sure to install the packages xmlto fop (and on Fedora +also xmlto-tex). For other package requirements, see below. + +If fop is giving you trouble you can edit the docs/Makefile.am file +at the top to remove WITH_FOP. It will then fall back to pdfxmltex +for which you will need the hack described in "Notes [Mar 2015]". + Notes [Jan 2019] ----------------- For Ubuntu 18.04, to build HTML docs I had to: |