README_DEVELOPERS suggests that make dist BUILD_ALL_DOCS=no can be used to build a tarball without building documentation. That command fails like so: make[5]: Entering directory '/home/whatever/valgrind/docs' Generating the text version of the FAQ ... export XML_CATALOG_FILES=/etc/xml/catalog && \ xsltproc --nonet --xinclude --path ../docs/xml -o ./FAQ.txt ../docs/lib/vg-faq2txt.xsl ../docs/xml/FAQ.xml /bin/bash: line 2: xsltproc: command not found make[5]: *** [Makefile:720: FAQ.txt] Error 127 Here's the patch to make it work: diff --git a/docs/Makefile.am b/docs/Makefile.am index f9ba4e395..0f2816b9a 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -292,10 +292,7 @@ dist-hook: FAQ.txt html-docs man-pages print-docs cp print/index.pdf $(distdir) cp print/index.ps $(distdir) else -dist-hook: FAQ.txt html-docs man-pages - cp -r html $(distdir) - cp FAQ.txt $(distdir)/.. - cp *.1 $(distdir) +dist-hook: endif distclean-local:
I think the intention is/was to skip the building of the print-docs which require some pdf/ps generation tools which are not always available. I believe the rest can simply be build when xsltproc is installed. Should we introduce some BUILD_NO_DOCS variant that doesn't build any documentation?
(In reply to Mark Wielaard from comment #1) > I think the intention is/was to skip the building of the print-docs which > require some pdf/ps generation tools which are not always available. I > believe the rest can simply be build when xsltproc is installed. > > Should we introduce some BUILD_NO_DOCS variant that doesn't build any > documentation? I ran into this when I wanted to provide a patch for https://bugs.kde.org/show_bug.cgi?id=495470 and test whether the tarball in fact contained the missing file. README_DEVELOPERS says: <quote> If you only want to test whether the generated tarball is complete and runs regression tests successfully, building documentation is not needed. make dist BUILD_ALL_DOCS=no </quote> I run ubuntu 22.04 which does not install xsltproc by default. Not sure about other distros. I think it should be possible to create a tarball without having xml machinery installed. Building documentation is not a frequent use case because of the pain involved (at least it used to be).
(In reply to Mark Wielaard from comment #1) > I think the intention is/was to skip the building of the print-docs which > require some pdf/ps generation tools which are not always available. I > believe the rest can simply be build when xsltproc is installed. Installing xsltproc does not help a bit: Generating the text version of the FAQ ... export XML_CATALOG_FILES=/etc/xml/catalog && \ xsltproc --nonet --xinclude --path ../docs/xml -o ./FAQ.txt ../docs/lib/vg-faq2txt.xsl ../docs/xml/FAQ.xml I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" compilation error: file ../docs/lib/vg-faq2txt.xsl line 10 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl Not sure why this fails as I can wget that docbook file just fine.
(In reply to Florian Krohm from comment #3) > > warning: failed to load external entity > "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" > compilation error: file ../docs/lib/vg-faq2txt.xsl line 10 element import > xsl:import : unable to load > http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl > > Not sure why this fails as I can wget that docbook file just fine. strace -f tells me: newfstatat(AT_FDCWD, "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl", 0x7ffef39f1400, 0) = -1 ENOENT (No such file or directory) Quick look at the manpage does not suggest newfstatat should work on URLs. Odd.
I think normally distros come with a package that has a local install of the validating documents. e.g. on fedora you would install docbook-dtds so no outgoing network traffic is needed: Name : docbook-dtds Epoch : 0 Version : 1.0 Release : 87.fc41 Architecture : noarch Installed size : 8.3 MiB Source : docbook-dtds-1.0-87.fc41.src.rpm From repository : <unknown> Summary : SGML and XML document type definitions for DocBook URL : http://www.oasis-open.org/docbook/ License : LicenseRef-docbook-dtds Description : The DocBook Document Type Definition (DTD) describes the syntax of : technical documentation texts (articles, books and manual pages). : This syntax is XML-compliant and is developed by the OASIS consortium. : This package contains SGML and XML versions of the DocBook DTD.