Generate actions section in guestfs.3 man page.
authorRichard Jones <rjones@redhat.com>
Sat, 4 Apr 2009 09:29:25 +0000 (10:29 +0100)
committerRichard Jones <rjones@redhat.com>
Sat, 4 Apr 2009 09:29:25 +0000 (10:29 +0100)
Makefile.am
README
configure.ac
guestfs.pod

index 9dc45a3..d900061 100644 (file)
@@ -19,7 +19,9 @@ ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = src daemon fish examples
 
 
 SUBDIRS = src daemon fish examples
 
-EXTRA_DIST = make-initramfs.sh
+EXTRA_DIST = \
+       make-initramfs.sh update-initramfs.sh \
+       guestfs.pod guestfs-actions.pod
 
 # Build the root filesystem.
 # Currently this is arch-dependent, so it seems like putting it in
 
 # Build the root filesystem.
 # Currently this is arch-dependent, so it seems like putting it in
@@ -52,6 +54,20 @@ CLEANFILES = $(fs_DATA) emptydisk
 clean-local:
        rm -rf initramfs
 
 clean-local:
        rm -rf initramfs
 
+# Manual page.
+# guestfs-actions.pod is autogenerated.  There is no include mechanism
+# for POD, so we have to do it by hand.
+
+man_MANS = guestfs.3
+
+guestfs.3: guestfs.pod guestfs-actions.pod
+       sed -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' < $< | \
+       $(POD2MAN) \
+         --section 3 \
+         -c "Virtualization Support" \
+         --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
+         > $@
+
 # Test-boot the image.
 
 test-boot: emptydisk
 # Test-boot the image.
 
 test-boot: emptydisk
diff --git a/README b/README
index 3e4da74..fe3de96 100644 (file)
--- a/README
+++ b/README
@@ -35,7 +35,8 @@ Requirements
 
 - XDR, rpcgen
 
 
 - XDR, rpcgen
 
-- (Optional) perldoc to generate the manual pages
+- perldoc (pod2man, pod2text) to generate the manual pages and
+other documentation.
 
 - (Optional) OCaml if you want to modify the code or rebuild certain
 generated files.
 
 - (Optional) OCaml if you want to modify the code or rebuild certain
 generated files.
index ef95cdd..0f7b4c3 100644 (file)
@@ -42,6 +42,14 @@ AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
        AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])
        ])
 
        AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])
        ])
 
+dnl Check for pod2man and pod2text.
+AC_CHECK_PROG([POD2MAN],[pod2man],[pod2man],[no])
+test "x$POD2MAN" = "xno" &&
+     AC_MSG_ERROR([pod2man must be installed])
+AC_CHECK_PROG([POD2TEXT],[pod2text],[pod2text],[no])
+test "x$POD2TEXT" = "xno" &&
+     AC_MSG_ERROR([pod2text must be installed])
+
 dnl Check for QEMU.  We only check for the basic 'qemu' program here
 dnl (ie. the i386 full system qemu).  But at runtime we might choose
 dnl a different qemu to run, eg. qemu-system-ppc.
 dnl Check for QEMU.  We only check for the basic 'qemu' program here
 dnl (ie. the i386 full system qemu).  But at runtime we might choose
 dnl a different qemu to run, eg. qemu-system-ppc.
index 61d51b7..70082da 100644 (file)
@@ -256,14 +256,7 @@ This returns the verbose messages flag.
 
 =head1 HIGH-LEVEL API ACTIONS
 
 
 =head1 HIGH-LEVEL API ACTIONS
 
-
-
-
-
-
-
-
-
+@ACTIONS@
 
 =head1 STATE MACHINE AND LOW-LEVEL EVENT API
 
 
 =head1 STATE MACHINE AND LOW-LEVEL EVENT API