f5654101fe52ad53ed8df667ea26f78483595730
[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 MANPAGES = \
27         guestfs.3 \
28         guestfish.1 \
29         libguestfs-test-tool.1 \
30         guestmount.1 \
31         $(patsubst %.pl,%.1,$(wildcard virt-*.pl))
32
33 # Ship the POD files and the translated manpages in the tarball.  This
34 # just simplifies building from the tarball, at a small cost in extra
35 # size.
36 EXTRA_DIST = \
37         $(MANPAGES) \
38         guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod \
39         guestfish.pod guestfish-actions.pod \
40         guestmount.pod \
41         libguestfs-test-tool.pod \
42         $(wildcard virt-*.pl)
43
44 all-local: $(MANPAGES)
45
46 if HAVE_PO4A
47
48 guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
49         sed \
50           -e '/@ACTIONS@/rguestfs-actions.pod' \
51           -e 's/@ACTIONS@//' \
52           -e '/@AVAILABILITY@/rguestfs-availability.pod' \
53           -e 's/@AVAILABILITY@//' \
54           -e '/@STRUCTS@/rguestfs-structs.pod' \
55           -e 's/@STRUCTS@//' \
56         < $< | \
57         $(POD2MAN) -u \
58           --section 3 \
59           -c "Virtualization Support" \
60           --name "guestfs" \
61           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
62           > $@-t; mv $@-t $@
63
64 guestfish.1: guestfish.pod guestfish-actions.pod
65         sed \
66           -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
67           < $< | \
68         $(POD2MAN) -u \
69           --section 1 \
70           -c "Virtualization Support" \
71           --name "guestfish" \
72           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
73           > $@-t; mv $@-t $@
74
75 guestmount.1: guestmount.pod
76         $(POD2MAN) -u \
77           --section 1 \
78           -c "Virtualization Support" \
79           --name "guestmount" \
80           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
81           $< > $@-t; mv $@-t $@
82
83 libguestfs-test-tool.1: libguestfs-test-tool.pod
84         $(POD2MAN) -u \
85           --section 1 \
86           -c "Virtualization Support" \
87           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
88           $< > $@-t; mv $@-t $@
89
90 virt-%.1: virt-%.pl
91         $(POD2MAN) -u \
92           --section 1 \
93           -c "Virtualization Support" \
94           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
95           $< > $@-t && mv $@-t $@
96
97 endif
98
99 # XXX Can automake do this properly?
100 install-data-hook:
101         $(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man1
102         $(INSTALL) -m 0644 guestfish.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
103         $(INSTALL) -m 0644 guestmount.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
104         $(INSTALL) -m 0644 virt-*.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
105         $(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man3
106         $(INSTALL) -m 0644 guestfs.3 $(DESTDIR)$(mandir)/$(LINGUA)/man3