1 # libguestfs translations of man pages and POD files
2 # Copyright (C) 2010 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., 675 Mass Ave, Cambridge, MA 02139, 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 # List of english POD sources which can be translated.
38 # Perl files count as POD as far as po4a is concerned.
41 ../src/guestfs-actions.pod \
42 ../src/guestfs-availability.pod \
43 ../src/guestfs-structs.pod \
44 ../fish/guestfish.pod \
45 ../fish/guestfish-actions.pod \
46 ../fish/guestfish-commands.pod \
47 ../test-tool/libguestfs-test-tool.pod \
48 ../fuse/guestmount.pod \
49 ../inspector/virt-inspector.pl \
50 $(wildcard ../tools/virt-*.pl)
53 update-po: libguestfs-docs.pot
60 # Note: po4a leaves empty '=encoding' lines in POD files. Also it
61 # includes a large warning message which ends up in the output. We
62 # post-process the output to remove both.
63 libguestfs-docs.pot: po4a.conf
65 -M utf-8 -L utf-8 -A utf-8 \
68 --package-name $(PACKAGE_NAME) \
69 --package-version $(PACKAGE_VERSION) \
70 --msgid-bugs-address libguestfs@redhat.com \
71 --copyright-holder "Red Hat Inc." \
73 for f in `find $(LINGUAS) -name '*.pod' -o -name '*.pl'`; do \
74 awk 'FNR >= 14 { print }' < $$f > $$f.new; \
78 po4a.conf: $(PODFILES)
80 echo "[po_directory] ." >> $@-t
82 for f in $(PODFILES); do \
83 b=`basename -- $$f`; \
84 echo "[type: pod] $$f \$$lang:\$$lang/$$b" >> $@-t; \