]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
its: Work around xmllint bug.
authorBruno Haible <bruno@clisp.org>
Mon, 14 Oct 2024 15:24:52 +0000 (17:24 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 14 Oct 2024 15:24:52 +0000 (17:24 +0200)
* gettext-tools/its/Makefile.am (check-local): Skip the ITS_FILES checks if
xmllint cannot grok the its.xsd schema.

gettext-tools/its/Makefile.am

index 47c74e692afcb04fe70685f258c953add1265fc4..e372a431125edf3402227c240bab3cd0e0237f6c 100644 (file)
@@ -36,12 +36,15 @@ LOC_FILES = \
 dist_its_DATA = $(ITS_FILES) $(LOC_FILES)
 
 # Checks the XML files against their schemas.
+# Work around <https://gitlab.gnome.org/GNOME/libxml2/-/issues/809>.
 check-local:
-       @for file in $(ITS_FILES); do \
-         echo "Checking $$file..."; \
-         echo "$(XMLLINT) --noout --schema $(top_srcdir)/src/its.xsd $(srcdir)/$$file"; \
-         $(XMLLINT) --noout --schema $(top_srcdir)/src/its.xsd $(srcdir)/$$file || exit 1; \
-       done
+       @if echo '<?xml version="1.0"?><rules xmlns="http://www.w3.org/2005/11/its" version="2.0"/>' | $(XMLLINT) --noout --schema $(top_srcdir)/src/its.xsd - >/dev/null 2>&1; then \
+         for file in $(ITS_FILES); do \
+           echo "Checking $$file..."; \
+           echo "$(XMLLINT) --noout --schema $(top_srcdir)/src/its.xsd $(srcdir)/$$file"; \
+           $(XMLLINT) --noout --schema $(top_srcdir)/src/its.xsd $(srcdir)/$$file || exit 1; \
+         done; \
+       fi
        @for file in $(LOC_FILES); do \
          echo "Checking $$file..."; \
          echo "$(XMLLINT) --noout --schema $(top_srcdir)/src/locating-rules.xsd $(srcdir)/$$file"; \