From f5d26e3cea568be665b6fbb442b328603cba8d93 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 17 Jul 2011 23:03:37 +0100 Subject: [PATCH] po-docs: Generate list of *.pod files. 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 | 27 +++++++++++---------------- po-docs/ja/Makefile.am | 6 +----- po-docs/podfiles | 32 ++++++++++++++++++++++++++++++++ po-docs/uk/Makefile.am | 6 +----- 4 files changed, 45 insertions(+), 26 deletions(-) create mode 100644 po-docs/podfiles diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am index 01a3f4a..ede07e7 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -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 $@ diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am index c60626e..a45cc1c 100644 --- a/po-docs/ja/Makefile.am +++ b/po-docs/ja/Makefile.am @@ -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 index 0000000..ce5b656 --- /dev/null +++ b/po-docs/podfiles @@ -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 diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am index c60626e..a45cc1c 100644 --- a/po-docs/uk/Makefile.am +++ b/po-docs/uk/Makefile.am @@ -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) -- 1.8.3.1