]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: make the location of the xml catalog file a configure option
authorJustin Clift <jclift@redhat.com>
Tue, 26 Oct 2010 15:07:00 +0000 (02:07 +1100)
committerJustin Clift <jclift@redhat.com>
Tue, 26 Oct 2010 15:22:14 +0000 (02:22 +1100)
The default location for the XML catalog file, /etc/xml/catalog,
used when validating the generated html docs, isn't correct for
MacOS X.

This commit adds an option to the configure script, allowing the
default to be overridden:

  --with-xml-catalog-file=/path/to/xml/catalog/file

configure.ac
docs/Makefile.am

index e41f2b5bd0ec550ac3f60159157047b0574baba8..272f12fcb236c6df958a0ca05fb5081a4b28e3a7 100644 (file)
@@ -171,6 +171,15 @@ AC_ARG_WITH([html-subdir], [AC_HELP_STRING([--with-html-subdir=path],
             [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
 AC_SUBST([HTML_DIR])
 
+dnl Specific XML catalog file for validation of generated html
+AC_ARG_WITH([xml-catalog-file],
+            [AC_HELP_STRING([--with-xml-catalog-file=path],
+                [path to XML catalog file for validating
+                 generated html, default /etc/xml/catalog])],
+            [XML_CATALOG_FILE=$withval],
+            [XML_CATALOG_FILE='/etc/xml/catalog'])
+AC_SUBST([XML_CATALOG_FILE])
+
 dnl if --prefix is /usr, don't use /usr/var for localstatedir
 dnl or /usr/etc for sysconfdir
 dnl as this makes a lot of things break in testing situations
@@ -2416,11 +2425,12 @@ AC_MSG_NOTICE([  Alloc OOM: $enable_oom])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Miscellaneous])
 AC_MSG_NOTICE([])
-AC_MSG_NOTICE([     Debug: $enable_debug])
-AC_MSG_NOTICE([  Warnings: $enable_compile_warnings])
-AC_MSG_NOTICE([  Readline: $lv_use_readline])
-AC_MSG_NOTICE([    Python: $with_python])
-AC_MSG_NOTICE([    DTrace: $with_dtrace])
+AC_MSG_NOTICE([        Debug: $enable_debug])
+AC_MSG_NOTICE([     Warnings: $enable_compile_warnings])
+AC_MSG_NOTICE([     Readline: $lv_use_readline])
+AC_MSG_NOTICE([       Python: $with_python])
+AC_MSG_NOTICE([       DTrace: $with_dtrace])
+AC_MSG_NOTICE([  XML Catalog: $XML_CATALOG_FILE])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Privileges])
 AC_MSG_NOTICE([])
index 3b3b4a0951d9d5e9961e681d1b99a9e8cb71b053..b28e04e0a4eda3adc4c8bb9af27c94c4eec52357 100644 (file)
@@ -123,10 +123,11 @@ todo:
 
 %.html: %.html.tmp
        @if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
-         if $(XMLCATALOG) /etc/xml/catalog \
+         if $(XMLCATALOG) '$(XML_CATALOG_FILE)' \
            "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
          echo "Validating $@" ; \
-         $(XMLLINT) --nonet --format --valid $< > $@ \
+         SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
+         $(XMLLINT) --catalogs --nonet --format --valid $< > $@ \
          || { rm $@ && exit 1; }; \
          else echo "missing XHTML1 DTD" ; fi ; fi
 
@@ -136,10 +137,11 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
          echo "Rebuilding the HTML pages from the XML API" ; \
          $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi
        -@if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
-         if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" \
+         if $(XMLCATALOG) '$(XML_CATALOG_FILE)' "-//W3C//DTD XHTML 1.0 Strict//EN" \
            > /dev/null ; then \
          echo "Validating the resulting XHTML pages" ; \
-         $(XMLLINT) --nonet --valid --noout html/*.html ; \
+         SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
+         $(XMLLINT) --catalogs --nonet --valid --noout html/*.html ; \
          else echo "missing XHTML1 DTD" ; fi ; fi
 
 $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)