Allow manual pages and POD files to be translated.
[libguestfs.git] / po-docs / ja / Makefile.am
1 # libguestfs translations of man pages and POD files
2 # Copyright (C) 2010 Red Hat Inc.
3 #
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.
8 #
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.
13 #
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.
17
18 # Note that each Makefile.am in po-docs/$lang/Makefile.am should be
19 # identical.  If you create a new $lang.po, create the $lang/
20 # subdirectory and copy the Makefile.am from an existing language.
21
22 LINGUA = $(shell basename -- `pwd`)
23
24 CLEANFILES = *.1 *.3
25
26 # Ship the final translated manpages in the tarball.
27 MANPAGES = \
28         guestfs.3 \
29         guestfish.1 \
30         libguestfs-test-tool.1 \
31         guestmount.1 \
32         $(patsubst %.pl,%.1,$(wildcard virt-*.pl))
33
34 EXTRA_DIST = $(MANPAGES)
35
36 all-local: $(MANPAGES)
37
38 guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
39         sed \
40           -e '/@ACTIONS@/rguestfs-actions.pod' \
41           -e 's/@ACTIONS@//' \
42           -e '/@AVAILABILITY@/rguestfs-availability.pod' \
43           -e 's/@AVAILABILITY@//' \
44           -e '/@STRUCTS@/rguestfs-structs.pod' \
45           -e 's/@STRUCTS@//' \
46         < $< | \
47         $(POD2MAN) -u \
48           --section 3 \
49           -c "Virtualization Support" \
50           --name "guestfs" \
51           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
52           > $@-t; mv $@-t $@
53
54 guestfish.1: guestfish.pod guestfish-actions.pod
55         sed \
56           -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
57           < $< | \
58         $(POD2MAN) -u \
59           --section 1 \
60           -c "Virtualization Support" \
61           --name "guestfish" \
62           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
63           > $@-t; mv $@-t $@
64
65 guestmount.1: guestmount.pod
66         $(POD2MAN) -u \
67           --section 1 \
68           -c "Virtualization Support" \
69           --name "guestmount" \
70           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
71           $< > $@-t; mv $@-t $@
72
73 libguestfs-test-tool.1: libguestfs-test-tool.pod
74         $(POD2MAN) -u \
75           --section 1 \
76           -c "Virtualization Support" \
77           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
78           $< > $@-t; mv $@-t $@
79
80 virt-%.1: virt-%.pl
81         $(POD2MAN) -u \
82           --section 1 \
83           -c "Virtualization Support" \
84           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
85           $< > $@-t && mv $@-t $@
86
87 # XXX Can automake do this properly?
88 install-data-hook:
89         $(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man1
90         $(INSTALL) -m 0644 guestfish.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
91         $(INSTALL) -m 0644 guestmount.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
92         $(INSTALL) -m 0644 virt-*.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
93         $(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man3
94         $(INSTALL) -m 0644 guestfs.3 $(DESTDIR)$(mandir)/$(LINGUA)/man3