-virt-df.1: virt-df.pl
- $(POD2MAN) \
- --section 1 \
- -c "Virtualization Support" \
- --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
- $< > $@
-
-$(top_builddir)/html/virt-df.1.html: virt-df.pl
- mkdir -p $(top_builddir)/html
- cd $(top_builddir) && pod2html \
- --css 'pod.css' \
- --title 'virt-df, display free space on virtual filesystems' \
- --htmldir html \
- --outfile html/virt-df.1.html \
- df/$<
-
-install-data-hook:
- mkdir -p $(DESTDIR)$(bindir)
- install -m 0755 virt-df.pl $(DESTDIR)$(bindir)/virt-df
-
-endif
+virt-df.1 $(top_builddir)/html/virt-df.1.html: stamp-virt-df.pod
+
+stamp-virt-df.pod: virt-df.pod
+ $(top_srcdir)/podwrapper.sh \
+ --man virt-df.1 \
+ --html $(top_builddir)/html/virt-df.1.html \
+ $<
+ touch $@
+
+# Tests.
+
+random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
+
+TESTS_ENVIRONMENT = \
+ MALLOC_PERTURB_=$(random_val) \
+ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
+ LIBGUESTFS_PATH=$(top_builddir)/appliance
+
+TESTS = test-virt-df.sh