Imported Upstream version 0.18.3.2
[platform/upstream/gettext.git] / gettext-tools / man / Makefile.am
1 ## Makefile for the gettext-tools/man subdirectory of GNU gettext
2 ## Copyright (C) 2001-2003, 2006-2007 Free Software Foundation, 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 3 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, see <http://www.gnu.org/licenses/>.
16
17 ## Process this file with automake to produce Makefile.in.
18
19 VERSION = @VERSION@
20
21 AUTOMAKE_OPTIONS = 1.2 gnits
22 EXTRA_DIST =
23
24 # A manual page for each of the bin_PROGRAMS in src/Makefile.am
25 # and for each of the bin_SCRIPTS in misc/Makefile.am.
26
27 man_aux = \
28 msgcmp.x msgfmt.x msgmerge.x msgunfmt.x xgettext.x \
29 msgattrib.x msgcat.x msgcomm.x msgconv.x msgen.x msgexec.x msgfilter.x msggrep.x msginit.x msguniq.x \
30 recode-sr-latin.x \
31 gettextize.x autopoint.x
32
33 # Likewise.
34
35 man_MAN1OTHER = \
36 msgcmp.1 msgfmt.1 msgmerge.1 msgunfmt.1 xgettext.1 \
37 msgattrib.1 msgcat.1 msgcomm.1 msgconv.1 msgen.1 msgexec.1 msgfilter.1 msggrep.1 msginit.1 msguniq.1 \
38 recode-sr-latin.1 \
39 gettextize.1 autopoint.1
40 man_MAN1 = $(man_MAN1OTHER)
41 man_MANS = $(man_MAN1)
42
43 man_HTMLOTHER = \
44 msgcmp.1.html msgfmt.1.html msgmerge.1.html msgunfmt.1.html xgettext.1.html \
45 msgattrib.1.html msgcat.1.html msgcomm.1.html msgconv.1.html msgen.1.html msgexec.1.html msgfilter.1.html msggrep.1.html msginit.1.html msguniq.1.html \
46 recode-sr-latin.1.html \
47 gettextize.1.html autopoint.1.html
48 man_HTML = $(man_HTMLOTHER)
49
50 EXTRA_DIST += help2man $(man_aux) $(man_MAN1OTHER) $(man_HTMLOTHER) ChangeLog.0
51 MAINTAINERCLEANFILES = $(man_MAN1OTHER) $(man_HTMLOTHER)
52
53 PERL = @PERL@
54 RM = rm -f
55
56 # help2man 1.24 or newer.
57 HELP2MAN = $(PERL) -w -- $(srcdir)/help2man
58
59 # groff 1.17 or newer.
60 MAN2HTML = groff -mandoc -Thtml
61
62
63 # We distribute both the man pages and their HTML equivalent.
64 # The user can generate the parts, via
65 #   make man
66 #   make html
67
68 all-local: html-local
69 install-data-local: install-html
70 installdirs-local: installdirs-html
71 uninstall-local: uninstall-html
72
73
74 # Man pages.
75
76 # The progname.x files contain some extra information not found in the
77 # "progname --help" output.
78
79 msgcmp.1: msgcmp.x
80         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcmp$(EXEEXT) $(srcdir)/msgcmp.x msgcmp.1
81 msgfmt.1: msgfmt.x
82         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgfmt$(EXEEXT) $(srcdir)/msgfmt.x msgfmt.1
83 msgmerge.1: msgmerge.x
84         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgmerge$(EXEEXT) $(srcdir)/msgmerge.x msgmerge.1
85 msgunfmt.1: msgunfmt.x
86         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgunfmt$(EXEEXT) $(srcdir)/msgunfmt.x msgunfmt.1
87 xgettext.1: xgettext.x
88         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/xgettext$(EXEEXT) $(srcdir)/xgettext.x xgettext.1
89 msgattrib.1: msgattrib.x
90         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgattrib$(EXEEXT) $(srcdir)/msgattrib.x msgattrib.1
91 msgcat.1: msgcat.x
92         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcat$(EXEEXT) $(srcdir)/msgcat.x msgcat.1
93 msgcomm.1: msgcomm.x
94         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcomm$(EXEEXT) $(srcdir)/msgcomm.x msgcomm.1
95 msgconv.1: msgconv.x
96         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgconv$(EXEEXT) $(srcdir)/msgconv.x msgconv.1
97 msgen.1: msgen.x
98         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgen$(EXEEXT) $(srcdir)/msgen.x msgen.1
99 msgexec.1: msgexec.x
100         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgexec$(EXEEXT) $(srcdir)/msgexec.x msgexec.1
101 msgfilter.1: msgfilter.x
102         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgfilter$(EXEEXT) $(srcdir)/msgfilter.x msgfilter.1
103 msggrep.1: msggrep.x
104         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msggrep$(EXEEXT) $(srcdir)/msggrep.x msggrep.1
105 msginit.1: msginit.x
106         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msginit$(EXEEXT) $(srcdir)/msginit.x msginit.1
107 msguniq.1: msguniq.x
108         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msguniq$(EXEEXT) $(srcdir)/msguniq.x msguniq.1
109 recode-sr-latin.1: recode-sr-latin.x
110         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/recode-sr-latin$(EXEEXT) $(srcdir)/recode-sr-latin.x recode-sr-latin.1
111
112 gettextize.1: gettextize.x
113         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../misc/gettextize $(srcdir)/gettextize.x gettextize.1
114 autopoint.1: autopoint.x
115         $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../misc/autopoint $(srcdir)/autopoint.x autopoint.1
116
117 # Depend on version.sh to get version number changes.
118 $(man_MAN1): help2man $(top_srcdir)/../version.sh
119
120 # Update them also during "make dist", in order to propagate added command
121 # line options that were added, even if version.sh didn't change.
122 UPDATEMODE =
123 update-man1:
124         $(MAKE) $(man_MAN1) UPDATEMODE=--update
125         $(MAKE)
126 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
127 #distdir: update-man1
128
129
130 # Man pages in HTML format.
131
132 html-local: $(man_HTML)
133
134 msgcmp.1.html: msgcmp.1
135         $(MAN2HTML) `if test -f msgcmp.1; then echo .; else echo $(srcdir); fi`/msgcmp.1 | sed -e '/CreationDate:/d' > t-$@
136         mv t-$@ $@
137 msgfmt.1.html: msgfmt.1
138         $(MAN2HTML) `if test -f msgfmt.1; then echo .; else echo $(srcdir); fi`/msgfmt.1 | sed -e '/CreationDate:/d' > t-$@
139         mv t-$@ $@
140 msgmerge.1.html: msgmerge.1
141         $(MAN2HTML) `if test -f msgmerge.1; then echo .; else echo $(srcdir); fi`/msgmerge.1 | sed -e '/CreationDate:/d' > t-$@
142         mv t-$@ $@
143 msgunfmt.1.html: msgunfmt.1
144         $(MAN2HTML) `if test -f msgunfmt.1; then echo .; else echo $(srcdir); fi`/msgunfmt.1 | sed -e '/CreationDate:/d' > t-$@
145         mv t-$@ $@
146 xgettext.1.html: xgettext.1
147         $(MAN2HTML) `if test -f xgettext.1; then echo .; else echo $(srcdir); fi`/xgettext.1 | sed -e '/CreationDate:/d' > t-$@
148         mv t-$@ $@
149 msgattrib.1.html: msgattrib.1
150         $(MAN2HTML) `if test -f msgattrib.1; then echo .; else echo $(srcdir); fi`/msgattrib.1 | sed -e '/CreationDate:/d' > t-$@
151         mv t-$@ $@
152 msgcat.1.html: msgcat.1
153         $(MAN2HTML) `if test -f msgcat.1; then echo .; else echo $(srcdir); fi`/msgcat.1 | sed -e '/CreationDate:/d' > t-$@
154         mv t-$@ $@
155 msgcomm.1.html: msgcomm.1
156         $(MAN2HTML) `if test -f msgcomm.1; then echo .; else echo $(srcdir); fi`/msgcomm.1 | sed -e '/CreationDate:/d' > t-$@
157         mv t-$@ $@
158 msgconv.1.html: msgconv.1
159         $(MAN2HTML) `if test -f msgconv.1; then echo .; else echo $(srcdir); fi`/msgconv.1 | sed -e '/CreationDate:/d' > t-$@
160         mv t-$@ $@
161 msgen.1.html: msgen.1
162         $(MAN2HTML) `if test -f msgen.1; then echo .; else echo $(srcdir); fi`/msgen.1 | sed -e '/CreationDate:/d' > t-$@
163         mv t-$@ $@
164 msgexec.1.html: msgexec.1
165         $(MAN2HTML) `if test -f msgexec.1; then echo .; else echo $(srcdir); fi`/msgexec.1 | sed -e '/CreationDate:/d' > t-$@
166         mv t-$@ $@
167 msgfilter.1.html: msgfilter.1
168         $(MAN2HTML) `if test -f msgfilter.1; then echo .; else echo $(srcdir); fi`/msgfilter.1 | sed -e '/CreationDate:/d' > t-$@
169         mv t-$@ $@
170 msggrep.1.html: msggrep.1
171         $(MAN2HTML) `if test -f msggrep.1; then echo .; else echo $(srcdir); fi`/msggrep.1 | sed -e '/CreationDate:/d' > t-$@
172         mv t-$@ $@
173 msginit.1.html: msginit.1
174         $(MAN2HTML) `if test -f msginit.1; then echo .; else echo $(srcdir); fi`/msginit.1 | sed -e '/CreationDate:/d' > t-$@
175         mv t-$@ $@
176 msguniq.1.html: msguniq.1
177         $(MAN2HTML) `if test -f msguniq.1; then echo .; else echo $(srcdir); fi`/msguniq.1 | sed -e '/CreationDate:/d' > t-$@
178         mv t-$@ $@
179 recode-sr-latin.1.html: recode-sr-latin.1
180         $(MAN2HTML) `if test -f recode-sr-latin.1; then echo .; else echo $(srcdir); fi`/recode-sr-latin.1 | sed -e '/CreationDate:/d' > t-$@
181         mv t-$@ $@
182 gettextize.1.html: gettextize.1
183         $(MAN2HTML) `if test -f gettextize.1; then echo .; else echo $(srcdir); fi`/gettextize.1 | sed -e '/CreationDate:/d' > t-$@
184         mv t-$@ $@
185 autopoint.1.html: autopoint.1
186         $(MAN2HTML) `if test -f autopoint.1; then echo .; else echo $(srcdir); fi`/autopoint.1 | sed -e '/CreationDate:/d' > t-$@
187         mv t-$@ $@
188
189 install-html-local:
190         $(MKDIR_P) $(DESTDIR)$(htmldir)
191         for file in $(man_HTML); do \
192           if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
193           $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
194         done
195
196 installdirs-html:
197         $(MKDIR_P) $(DESTDIR)$(htmldir)
198
199 uninstall-html:
200         for file in $(man_HTML); do \
201           $(RM) $(DESTDIR)$(htmldir)/$$file; \
202         done