CLEANFILES = *.1 *.3
-# Ship the final translated manpages in the tarball.
MANPAGES = \
guestfs.3 \
guestfish.1 \
guestmount.1 \
$(patsubst %.pl,%.1,$(wildcard virt-*.pl))
-EXTRA_DIST = $(MANPAGES)
+# Ship the POD files and the translated manpages in the tarball. This
+# just simplifies building from the tarball, at a small cost in extra
+# size.
+EXTRA_DIST = \
+ $(MANPAGES) \
+ guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod \
+ guestfish.pod guestfish-actions.pod guestfish-commands.pod \
+ guestmount.pod \
+ libguestfs-test-tool.pod \
+ $(wildcard virt-*.pl)
all-local: $(MANPAGES)
+if HAVE_PO4A
+
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
sed \
-e '/@ACTIONS@/rguestfs-actions.pod' \
--release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
> $@-t; mv $@-t $@
-guestfish.1: guestfish.pod guestfish-actions.pod
+guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
sed \
-e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
+ -e '/@FISH_COMMANDS@/rguestfish-commands.pod' -e 's/@FISH_COMMANDS@//' \
< $< | \
$(POD2MAN) -u \
--section 1 \
--release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
$< > $@-t && mv $@-t $@
+endif
+
# XXX Can automake do this properly?
install-data-hook:
$(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man1