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., 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 $(wildcard ../tools/virt-*.pl)
51 update-po: libguestfs-docs.pot
53 # Note: po4a leaves empty '=encoding' lines in POD files. Also it
54 # includes a large warning message which ends up in the output. We
55 # post-process the output to remove both.
56 libguestfs-docs.pot: po4a.conf
58 -M utf-8 -L utf-8 -A utf-8 \
61 --package-name $(PACKAGE_NAME) \
62 --package-version $(PACKAGE_VERSION) \
63 --msgid-bugs-address libguestfs@redhat.com \
64 --copyright-holder "Red Hat Inc." \
66 for f in `find $(LINGUAS) -name '*.pod' -o -name '*.pl'`; do \
67 awk 'FNR >= 14 { print }' < $$f > $$f.new; \
71 po4a.conf: $(PODFILES)
73 echo "[po_directory] ." >> $@-t
75 for f in $(PODFILES); do \
76 b=`basename -- $$f`; \
77 echo "[type: pod] $$f \$$lang:\$$lang/$$b" >> $@-t; \