Validate protocol descriptions against schema in "make check", using xmllint. These...
authorJosh Triplett <josh@freedesktop.org>
Sun, 5 Mar 2006 02:29:40 +0000 (18:29 -0800)
committerJosh Triplett <josh@freedesktop.org>
Sun, 5 Mar 2006 02:29:40 +0000 (18:29 -0800)
configure.ac
src/Makefile.am

index 2baaab4..5b52e6c 100644 (file)
@@ -8,6 +8,12 @@ AC_INIT([XCBProto],
 AC_CONFIG_SRCDIR([xcb-proto.pc.in])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
+AC_PATH_PROG(XMLLINT, xmllint, no)
+AM_CONDITIONAL(HAVE_XMLLINT, test "x$XMLLINT" != "xno")
+if test "$XSLTPROC" = "no"; then
+   AC_MSG_WARN([xmllint not found; unable to validate against schema.])
+fi
+
 xcbincludedir='${includedir}/X11/XCB'
 AC_SUBST(xcbincludedir)
 
index e2d519e..566f176 100644 (file)
@@ -20,3 +20,9 @@ nobase_xcbinclude_HEADERS = xcb.xsd                  \
                            extensions/xprint.xml    \
                            extensions/xv.xml        \
                            extensions/xvmc.xml
+
+if HAVE_XMLLINT
+check-local:
+       $(XMLLINT) --noout --schema $(srcdir)/xcb.xsd \
+                  $(srcdir)/*.xml $(srcdir)/extensions/*.xml
+endif