From: Richard Jones Date: Sat, 4 Apr 2009 09:29:25 +0000 (+0100) Subject: Generate actions section in guestfs.3 man page. X-Git-Tag: 0.4~19 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=64a5ae0e969754c709974104a83e6d1dbb4c2764 Generate actions section in guestfs.3 man page. --- diff --git a/Makefile.am b/Makefile.am index 9dc45a3..d900061 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,9 @@ ACLOCAL_AMFLAGS = -I m4 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 @@ -52,6 +54,20 @@ CLEANFILES = $(fs_DATA) emptydisk 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 diff --git a/README b/README index 3e4da74..fe3de96 100644 --- a/README +++ b/README @@ -35,7 +35,8 @@ Requirements - 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. diff --git a/configure.ac b/configure.ac index ef95cdd..0f7b4c3 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,14 @@ AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[ 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. diff --git a/guestfs.pod b/guestfs.pod index 61d51b7..70082da 100644 --- a/guestfs.pod +++ b/guestfs.pod @@ -256,14 +256,7 @@ This returns the verbose messages flag. =head1 HIGH-LEVEL API ACTIONS - - - - - - - - +@ACTIONS@ =head1 STATE MACHINE AND LOW-LEVEL EVENT API