]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
docs/Makefile.am: Make sure xml catalog file exists for xmllint check
authorMark Wielaard <mark@klomp.org>
Sun, 9 Mar 2025 15:46:50 +0000 (16:46 +0100)
committerMark Wielaard <mark@klomp.org>
Sun, 9 Mar 2025 15:46:56 +0000 (16:46 +0100)
When XML_CATALOG_FILES don't exist on the system xmllint will have to
query those files through various websites. When there is a network
error xmllint will fail. So make sure to only run the validity tests
when both xmllint and XML_CATALOG_FILES exists.

docs/Makefile.am

index 12d13db1da358dbcdce9ed7e70798876cdd3a395..68a3da561765759e3bffbc64f7cb04c599320447 100644 (file)
@@ -186,14 +186,20 @@ all-docs: FAQ.txt man-pages html-docs print-docs
 
 valid-manual: $(MANUAL_XML_FILES)
        if type $(XMLLINT) 2>/dev/null; then \
-         $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/index.xml && \
-         touch $@; \
+         if [ -f $(XML_CATALOG_FILES) ]; then \
+           export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \
+           $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/index.xml && \
+           touch $@; \
+         fi \
        fi
 
 valid-manpages: $(MANPAGES_XML_FILES)
        if type $(XMLLINT) 2>/dev/null; then \
-         $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/manpages-index.xml && \
-         touch $@; \
+         if [ -f $(XML_CATALOG_FILES) ]; then \
+           export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \
+           $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/manpages-index.xml && \
+           touch $@; \
+         fi \
        fi
 
 check-local: valid-manual valid-manpages