New tool: virt-sysprep: system preparation for guests.
[libguestfs.git] / po-docs / Makefile.am
index c0a916e..22b6635 100644 (file)
@@ -1,5 +1,5 @@
 # libguestfs translations of man pages and POD files
 # libguestfs translations of man pages and POD files
-# Copyright (C) 2010 Red Hat Inc.
+# Copyright (C) 2010-2011 Red Hat Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 # libguestfs.pot file.
 
 # Languages.
 # libguestfs.pot file.
 
 # Languages.
-LINGUAS = ja
+LINGUAS = ja uk
 
 EXTRA_DIST = \
        libguestfs-docs.pot \
 
 EXTRA_DIST = \
        libguestfs-docs.pot \
@@ -34,27 +34,7 @@ CLEANFILES = po4a.conf
 # XXX Is there a better way?
 SUBDIRS = $(LINGUAS)
 
 # 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)
-
-if HAVE_PO4A
 update-po: libguestfs-docs.pot
 update-po: libguestfs-docs.pot
-else
-update-po:
-endif
-
-if HAVE_PO4A
 
 # Note: po4a leaves empty '=encoding' lines in POD files.  Also it
 # includes a large warning message which ends up in the output.  We
 
 # Note: po4a leaves empty '=encoding' lines in POD files.  Also it
 # includes a large warning message which ends up in the output.  We
@@ -70,19 +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 \
          --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
 
          mv $$f.new $$f; \
        done
 
-po4a.conf: $(PODFILES)
+po4a.conf: podfiles
        rm -f $@-t
        echo "[po_directory] ." >> $@-t
        echo >> $@-t
        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 $@
 
          b=`basename -- $$f`; \
          echo "[type: pod] $$f \$$lang:\$$lang/$$b" >> $@-t; \
          echo >> $@-t; \
        done;
        mv $@-t $@
 
-endif
+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 $@