X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=po-docs%2FMakefile.am;h=22b6635ebad923a74b4dfdef8ae28759b04f2ccf;hp=282777028cdb94cf9ea54a875a3190f59fc74d2d;hb=7c521c7211d61a1bac46c155de1f4d3e8b60b3d7;hpb=58f7a5a4ac8cce77dfaded1c29f3ad382b4cc9a8 diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am index 2827770..22b6635 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -20,7 +20,7 @@ # libguestfs.pot file. # Languages. -LINGUAS = ja +LINGUAS = ja uk EXTRA_DIST = \ libguestfs-docs.pot \ @@ -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 @@ -64,17 +50,30 @@ libguestfs-docs.pot: po4a.conf --copyright-holder "Red Hat Inc." \ po4a.conf for f in `find $(LINGUAS) -name '*.pod' -o -name '*.pl'`; do \ - awk 'FNR >= 14 { print }' < $$f > $$f.new; \ + echo '=encoding utf8' > $$f.new; \ + awk 'FNR >= 14 { print }' < $$f >> $$f.new; \ 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 /debian/ | \ + grep -v /libguestfs-1 | \ + grep -v /po-docs/ | \ + grep -v /stamp- \ + > $@-t + find $(top_srcdir)/tools -name 'virt-*.pl' >> $@-t + LC_ALL=C sort -o $@-t $@-t + mv $@-t $@