inspector: List Debian packages.
[libguestfs.git] / inspector / Makefile.am
index 7dd71dc..6b937d3 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
+include $(top_srcdir)/subdir-rules.mk
+
+EXAMPLE_XML = \
+       example1.xml example2.xml example3.xml \
+       example4.xml example5.xml example6.xml
+
 EXTRA_DIST = \
-       run-inspector-locally
+       run-inspector-locally \
+       virt-inspector
+
+docdir = @docdir@
+dist_doc_DATA = \
+       virt-inspector.rng \
+       $(EXAMPLE_XML)
 
 if HAVE_INSPECTOR
 
 bin_SCRIPTS = virt-inspector
 man_MANS = virt-inspector.1
 
-noinst_DATA = $(top_builddir)/html/virt-inspector.1.html
+noinst_DATA = \
+       $(top_builddir)/html/virt-inspector.1.html
 
 virt-inspector.1: virt-inspector
        $(POD2MAN) \
@@ -41,4 +54,20 @@ $(top_builddir)/html/virt-inspector.1.html: virt-inspector
          --outfile html/virt-inspector.1.html \
          inspector/$<
 
+if HAVE_XMLLINT
+
+TESTS = $(EXAMPLE_XML)
+TESTS_ENVIRONMENT = $(XMLLINT) --noout --relaxng virt-inspector.rng
+
 endif
+
+endif
+
+# Make symlink from virt-inspector.pl to virt-inspector.  This is just
+# to keep xgettext happy since it uses the file extension to determine
+# the implementation language of a file.
+
+all-local: virt-inspector.pl
+
+virt-inspector.pl: virt-inspector
+       ln -sf $< $@