1 # libguestfs translations of man pages and POD files
2 # Copyright (C) 2010-2011 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 # XXX The use of po4a is naive here. Also we should integrate this
19 # into the po/ directory and the translations into the usual
20 # libguestfs.pot file.
29 CLEANFILES = po4a.conf
31 # Build the final man pages from the translated POD files. Each
32 # language directory contains a Makefile.am that we need to keep up to
33 # date (note each $lang/Makefile.am should be identical).
34 # XXX Is there a better way?
37 update-po: libguestfs-docs.pot
39 # Note: po4a leaves empty '=encoding' lines in POD files. Also it
40 # includes a large warning message which ends up in the output. We
41 # post-process the output to remove both.
42 libguestfs-docs.pot: po4a.conf
44 -M utf-8 -L utf-8 -A utf-8 \
47 --package-name $(PACKAGE_NAME) \
48 --package-version $(PACKAGE_VERSION) \
49 --msgid-bugs-address libguestfs@redhat.com \
50 --copyright-holder "Red Hat Inc." \
52 for f in `find $(LINGUAS) -name '*.pod' -o -name '*.pl'`; do \
53 echo '=encoding utf8' > $$f.new; \
54 awk 'FNR >= 14 { print }' < $$f >> $$f.new; \
60 echo "[po_directory] ." >> $@-t
62 for f in `cat podfiles`; do \
63 b=`basename -- $$f`; \
64 echo "[type: pod] $$f \$$lang:\$$lang/$$b" >> $@-t; \
71 find $(top_srcdir) -name '*.pod' | \
73 grep -v /libguestfs-1 | \
77 find $(top_srcdir)/tools -name 'virt-*.pl' >> $@-t
78 LC_ALL=C sort -o $@-t $@-t