po-docs: Generate list of *.pod files.
authorRichard W.M. Jones <rjones@redhat.com>
Sun, 17 Jul 2011 22:03:37 +0000 (23:03 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Sun, 17 Jul 2011 22:05:32 +0000 (23:05 +0100)
Generate the list of *.pod files, instead of hard coding
it (and having it get very very out of date).  Store the
list in a separate file po-docs/podfiles.

po-docs/Makefile.am
po-docs/ja/Makefile.am
po-docs/podfiles [new file with mode: 0644]
po-docs/uk/Makefile.am

index 01a3f4a..ede07e7 100644 (file)
@@ -34,20 +34,6 @@ CLEANFILES = po4a.conf
 # XXX Is there a better way?
 SUBDIRS = $(LINGUAS)
 
-# List of english POD sources which can be translated.
-# Perl files count as POD as far as po4a is concerned.
-PODFILES = \
-       ../src/guestfs.pod \
-       ../src/guestfs-actions.pod \
-       ../src/guestfs-availability.pod \
-       ../src/guestfs-structs.pod \
-       ../fish/guestfish.pod \
-       ../fish/guestfish-actions.pod \
-       ../fish/guestfish-commands.pod \
-       ../test-tool/libguestfs-test-tool.pod \
-       ../fuse/guestmount.pod \
-       $(wildcard ../tools/virt-*.pl)
-
 update-po: libguestfs-docs.pot
 
 # Note: po4a leaves empty '=encoding' lines in POD files.  Also it
@@ -68,13 +54,22 @@ libguestfs-docs.pot: po4a.conf
          mv $$f.new $$f; \
        done
 
-po4a.conf: $(PODFILES)
+po4a.conf: podfiles
        rm -f $@-t
        echo "[po_directory] ." >> $@-t
        echo >> $@-t
-       for f in $(PODFILES); do \
+       for f in `cat podfiles`; do \
          b=`basename -- $$f`; \
          echo "[type: pod] $$f \$$lang:\$$lang/$$b" >> $@-t; \
          echo >> $@-t; \
        done;
        mv $@-t $@
+
+podfiles: Makefile
+       rm -f $@ $@-t
+       find $(top_srcdir) -name '*.pod' | \
+         grep -v /stamp- | \
+         grep -v /po-docs/ > $@-t
+       find $(top_srcdir)/tools -name 'virt-*.pl' >> $@-t
+       sort -o $@-t $@-t
+       mv $@-t $@
index c60626e..a45cc1c 100644 (file)
@@ -35,11 +35,7 @@ MANPAGES = \
 # 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)
+       $(cat ../podfiles)
 
 all-local: $(MANPAGES)
 
diff --git a/po-docs/podfiles b/po-docs/podfiles
new file mode 100644 (file)
index 0000000..ce5b656
--- /dev/null
@@ -0,0 +1,32 @@
+../cat/virt-cat.pod
+../cat/virt-filesystems.pod
+../cat/virt-ls.pod
+../df/virt-df.pod
+../edit/virt-edit.pod
+../examples/guestfs-examples.pod
+../examples/guestfs-recipes.pod
+../fish/guestfish-actions.pod
+../fish/guestfish-commands.pod
+../fish/guestfish.pod
+../fish/virt-copy-in.pod
+../fish/virt-copy-out.pod
+../fish/virt-tar-in.pod
+../fish/virt-tar-out.pod
+../fuse/guestmount.pod
+../inspector/virt-inspector.pod
+../ocaml/examples/guestfs-ocaml.pod
+../perl/examples/guestfs-perl.pod
+../python/examples/guestfs-python.pod
+../rescue/virt-rescue.pod
+../resize/virt-resize.pod
+../ruby/examples/guestfs-ruby.pod
+../src/guestfs-actions.pod
+../src/guestfs-availability.pod
+../src/guestfs.pod
+../src/guestfs-structs.pod
+../test-tool/libguestfs-test-tool.pod
+../tools/virt-list-filesystems.pl
+../tools/virt-list-partitions.pl
+../tools/virt-make-fs.pl
+../tools/virt-tar.pl
+../tools/virt-win-reg.pl
index c60626e..a45cc1c 100644 (file)
@@ -35,11 +35,7 @@ MANPAGES = \
 # 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)
+       $(cat ../podfiles)
 
 all-local: $(MANPAGES)