inspector: Add tests for RELAX NG schema.
[libguestfs.git] / inspector / Makefile.am
index a93a1ff..25f5e3c 100644 (file)
 
 EXTRA_DIST = \
        run-inspector-locally \
-       virt-inspector.pl
+       virt-inspector \
+       virt-inspector.rng \
+       example1.xml example2.xml example3.xml example4.xml
 
 if HAVE_INSPECTOR
 
+bin_SCRIPTS = virt-inspector
 man_MANS = virt-inspector.1
+dist_doc_DATA = \
+       virt-inspector.rng \
+       example1.xml example2.xml example3.xml example4.xml
 
 noinst_DATA = $(top_builddir)/html/virt-inspector.1.html
 
-virt-inspector.1: virt-inspector.pl
+virt-inspector.1: virt-inspector
        $(POD2MAN) \
          --section 1 \
          -c "Virtualization Support" \
          --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
-         $< > $@
+         $< > $@-t && mv $@-t $@
 
-$(top_builddir)/html/virt-inspector.1.html: virt-inspector.pl
+$(top_builddir)/html/virt-inspector.1.html: virt-inspector
        mkdir -p $(top_builddir)/html
        cd $(top_builddir) && pod2html \
          --css 'pod.css' \
@@ -41,8 +47,11 @@ $(top_builddir)/html/virt-inspector.1.html: virt-inspector.pl
          --outfile html/virt-inspector.1.html \
          inspector/$<
 
-install-data-hook:
-       mkdir -p $(DESTDIR)$(bindir)
-       install -m 0755 virt-inspector.pl $(DESTDIR)$(bindir)/virt-inspector
+if HAVE_XMLLINT
+
+TESTS = example1.xml example2.xml example3.xml example4.xml
+TESTS_ENVIRONMENT = $(XMLLINT) --noout --relaxng virt-inspector.rng
+
+endif
 
 endif