1 ## Makefile for the gettext-tools/man subdirectory of GNU gettext
2 ## Copyright (C) 2001-2003, 2006-2007 Free Software Foundation, 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 3 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, see <http://www.gnu.org/licenses/>.
17 ## Process this file with automake to produce Makefile.in.
21 AUTOMAKE_OPTIONS = 1.2 gnits
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.
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 \
31 gettextize.x autopoint.x
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 \
39 gettextize.1 autopoint.1
40 man_MAN1 = $(man_MAN1OTHER)
41 man_MANS = $(man_MAN1)
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)
50 EXTRA_DIST += help2man $(man_aux) $(man_MAN1OTHER) $(man_HTMLOTHER) ChangeLog.0
51 MAINTAINERCLEANFILES = $(man_MAN1OTHER) $(man_HTMLOTHER)
56 # help2man 1.24 or newer.
57 HELP2MAN = $(PERL) -w -- $(srcdir)/help2man
59 # groff 1.17 or newer.
60 MAN2HTML = groff -mandoc -Thtml
63 # We distribute both the man pages and their HTML equivalent.
64 # The user can generate the parts, via
69 install-data-local: install-html
70 installdirs-local: installdirs-html
71 uninstall-local: uninstall-html
76 # The progname.x files contain some extra information not found in the
77 # "progname --help" output.
80 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcmp$(EXEEXT) $(srcdir)/msgcmp.x msgcmp.1
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
92 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcat$(EXEEXT) $(srcdir)/msgcat.x msgcat.1
94 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcomm$(EXEEXT) $(srcdir)/msgcomm.x msgcomm.1
96 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgconv$(EXEEXT) $(srcdir)/msgconv.x msgconv.1
98 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgen$(EXEEXT) $(srcdir)/msgen.x msgen.1
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
104 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msggrep$(EXEEXT) $(srcdir)/msggrep.x msggrep.1
106 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msginit$(EXEEXT) $(srcdir)/msginit.x msginit.1
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
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
117 # Depend on version.sh to get version number changes.
118 $(man_MAN1): help2man $(top_srcdir)/../version.sh
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.
124 $(MAKE) $(man_MAN1) UPDATEMODE=--update
126 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
127 #distdir: update-man1
130 # Man pages in HTML format.
132 html-local: $(man_HTML)
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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-$@
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; \
197 $(MKDIR_P) $(DESTDIR)$(htmldir)
200 for file in $(man_HTML); do \
201 $(RM) $(DESTDIR)$(htmldir)/$$file; \