Fix Metaproxy stops logging after check config failed MP-590
[metaproxy-moved-to-github.git] / etc / Makefile.am
index f62c6e7..5dbb9fb 100644 (file)
@@ -1,24 +1,54 @@
-# $Id: Makefile.am,v 1.1 2006-04-27 17:01:00 adam Exp $
 
 # This doesn't actually build anything, it just tests whether the
 # configuration files here correspond with the schema.
 
 etcdatadir = $(pkgdatadir)/etc
 
-config = config0.xml config1.xml config2.xml \
-       config3.xml config4.xml config5.xml \
-       config-simple-multi.xml
+xmlconfig = $(srcdir)/config-bytarget.xml \
+    $(srcdir)/config-local.xml \
+    $(srcdir)/config-load-balance.xml \
+    $(srcdir)/config-record-transform.xml \
+    $(srcdir)/config-shared1.xml \
+    $(srcdir)/config-simple-multi.xml \
+    $(srcdir)/config-sru-to-z3950.xml \
+    $(srcdir)/config-sru-holdings.xml \
+    $(srcdir)/config-zurg.xml \
+    $(srcdir)/config0.xml \
+    $(srcdir)/config1.xml \
+    $(srcdir)/config2.xml \
+    $(srcdir)/config3.xml \
+    $(srcdir)/config4.xml \
+    $(srcdir)/config5.xml \
+    $(srcdir)/config-cgi.xml \
+    $(srcdir)/config-solr.xml \
+    $(srcdir)/config-zoom.xml \
+    $(srcdir)/config-proxy.xml \
+    $(srcdir)/config-rewrite.xml \
+    $(srcdir)/retrieval-info.xml
+
+config = example.simple-auth example.target-auth pqf2pqf.xsl explain.xml \
+       ztest.pem
+
+
+rng = $(srcdir)/../xml/schema/metaproxy.rng
+xsd = $(srcdir)/../xml/schema/metaproxy.xsd
+
+etcdata_DATA = $(xmlconfig) $(config)
+
+EXTRA_DIST = $(etcdata_DATA) cgi.sh
+
+.PHONY: check_rng
+check_rng:
+       if test -f $(rng); then \
+               xmllint --noout --xinclude --relaxng $(rng) $(xmlconfig); \
+       fi
+
+## Only run XSD checks for a "new" Libxml2
+.PHONY: check_xsd
+check_xsd: 
+       if test `xmllint --version 2>&1 |head -1|awk '{print $$5}'` -gt 20622; then xmllint --noout --xinclude --schema $(xsd) $(xmlconfig); fi
+
+#check-local: check_rng check_xsd
+check-local: check_rng
 
-misc = example.simple-auth example.target-auth pqf2pqf.xsl
-
-etcdata_DATA = $(config) $(misc)
-
-EXTRA_DIST = $(etcdata_DATA)
-
-test: test-config0 test-config1 test-config2 \
-      test-config3 test-config4 test-config5 \
-      test-config-simple-multi
-
-test-%: %.xml config.xsd 
-       xmllint --noout --schema config.xsd $<