1 ## Makefile for the gettext-tools/man subdirectory of GNU gettext
2 ## Copyright (C) 2001-2003 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 2, or (at your option)
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ## Process this file with automake to produce Makefile.in.
25 localedir = $(datadir)/locale
27 AUTOMAKE_OPTIONS = 1.2 gnits
30 # A manual page for each of the bin_PROGRAMS in src/Makefile.am
31 # and for each of the bin_SCRIPTS in misc/Makefile.am.
34 msgcmp.x msgfmt.x msgmerge.x msgunfmt.x xgettext.x \
35 msgattrib.x msgcat.x msgcomm.x msgconv.x msgen.x msgexec.x msgfilter.x msggrep.x msginit.x msguniq.x \
36 gettextize.x autopoint.x
41 msgcmp.1 msgfmt.1 msgmerge.1 msgunfmt.1 xgettext.1 \
42 msgattrib.1 msgcat.1 msgcomm.1 msgconv.1 msgen.1 msgexec.1 msgfilter.1 msggrep.1 msginit.1 msguniq.1 \
43 gettextize.1 autopoint.1
44 man_MAN1 = $(man_MAN1OTHER)
45 man_MANS = $(man_MAN1)
48 msgcmp.1.html msgfmt.1.html msgmerge.1.html msgunfmt.1.html xgettext.1.html \
49 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 \
50 gettextize.1.html autopoint.1.html
51 man_HTML = $(man_HTMLOTHER)
53 EXTRA_DIST += help2man $(man_aux) $(man_MAN1OTHER) $(man_HTMLOTHER) ChangeLog.0
54 MAINTAINERCLEANFILES = $(man_MAN1OTHER) $(man_HTMLOTHER)
59 # help2man 1.24 or newer.
60 HELP2MAN = $(PERL) -w -- $(srcdir)/help2man
62 # groff 1.17 or newer.
63 MAN2HTML = groff -mandoc -Thtml
66 # We distribute both the man pages and their HTML equivalent.
67 # The user can generate the parts, via
72 install-data-local: install-html
73 installdirs-local: installdirs-html
74 uninstall-local: uninstall-html
79 # The progname.x files contain some extra information not found in the
80 # "progname --help" output.
83 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcmp$(EXEEXT) $(srcdir)/msgcmp.x msgcmp.1
85 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgfmt$(EXEEXT) $(srcdir)/msgfmt.x msgfmt.1
86 msgmerge.1: msgmerge.x
87 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgmerge$(EXEEXT) $(srcdir)/msgmerge.x msgmerge.1
88 msgunfmt.1: msgunfmt.x
89 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgunfmt$(EXEEXT) $(srcdir)/msgunfmt.x msgunfmt.1
90 xgettext.1: xgettext.x
91 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/xgettext$(EXEEXT) $(srcdir)/xgettext.x xgettext.1
92 msgattrib.1: msgattrib.x
93 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgattrib$(EXEEXT) $(srcdir)/msgattrib.x msgattrib.1
95 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcat$(EXEEXT) $(srcdir)/msgcat.x msgcat.1
97 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcomm$(EXEEXT) $(srcdir)/msgcomm.x msgcomm.1
99 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgconv$(EXEEXT) $(srcdir)/msgconv.x msgconv.1
101 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgen$(EXEEXT) $(srcdir)/msgen.x msgen.1
103 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgexec$(EXEEXT) $(srcdir)/msgexec.x msgexec.1
104 msgfilter.1: msgfilter.x
105 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgfilter$(EXEEXT) $(srcdir)/msgfilter.x msgfilter.1
107 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msggrep$(EXEEXT) $(srcdir)/msggrep.x msggrep.1
109 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msginit$(EXEEXT) $(srcdir)/msginit.x msginit.1
111 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msguniq$(EXEEXT) $(srcdir)/msguniq.x msguniq.1
113 gettextize.1: gettextize.x
114 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../misc/gettextize $(srcdir)/gettextize.x gettextize.1
115 autopoint.1: autopoint.x
116 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../misc/autopoint $(srcdir)/autopoint.x autopoint.1
118 # Depend on version.sh to get version number changes.
119 $(man_MAN1): help2man $(top_srcdir)/../version.sh
121 # Update them also during "make dist", in order to propagate added command
122 # line options that were added, even if version.sh didn't change.
125 $(MAKE) $(man_MAN1) UPDATEMODE=--update
127 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
128 #distdir: update-man1
131 # Man pages in HTML format.
133 html-local: $(man_HTML)
135 msgcmp.1.html: msgcmp.1
136 $(MAN2HTML) `if test -f msgcmp.1; then echo .; else echo $(srcdir); fi`/msgcmp.1 | sed -e '/CreationDate:/d' > t-$@
138 msgfmt.1.html: msgfmt.1
139 $(MAN2HTML) `if test -f msgfmt.1; then echo .; else echo $(srcdir); fi`/msgfmt.1 | sed -e '/CreationDate:/d' > t-$@
141 msgmerge.1.html: msgmerge.1
142 $(MAN2HTML) `if test -f msgmerge.1; then echo .; else echo $(srcdir); fi`/msgmerge.1 | sed -e '/CreationDate:/d' > t-$@
144 msgunfmt.1.html: msgunfmt.1
145 $(MAN2HTML) `if test -f msgunfmt.1; then echo .; else echo $(srcdir); fi`/msgunfmt.1 | sed -e '/CreationDate:/d' > t-$@
147 xgettext.1.html: xgettext.1
148 $(MAN2HTML) `if test -f xgettext.1; then echo .; else echo $(srcdir); fi`/xgettext.1 | sed -e '/CreationDate:/d' > t-$@
150 msgattrib.1.html: msgattrib.1
151 $(MAN2HTML) `if test -f msgattrib.1; then echo .; else echo $(srcdir); fi`/msgattrib.1 | sed -e '/CreationDate:/d' > t-$@
153 msgcat.1.html: msgcat.1
154 $(MAN2HTML) `if test -f msgcat.1; then echo .; else echo $(srcdir); fi`/msgcat.1 | sed -e '/CreationDate:/d' > t-$@
156 msgcomm.1.html: msgcomm.1
157 $(MAN2HTML) `if test -f msgcomm.1; then echo .; else echo $(srcdir); fi`/msgcomm.1 | sed -e '/CreationDate:/d' > t-$@
159 msgconv.1.html: msgconv.1
160 $(MAN2HTML) `if test -f msgconv.1; then echo .; else echo $(srcdir); fi`/msgconv.1 | sed -e '/CreationDate:/d' > t-$@
162 msgen.1.html: msgen.1
163 $(MAN2HTML) `if test -f msgen.1; then echo .; else echo $(srcdir); fi`/msgen.1 | sed -e '/CreationDate:/d' > t-$@
165 msgexec.1.html: msgexec.1
166 $(MAN2HTML) `if test -f msgexec.1; then echo .; else echo $(srcdir); fi`/msgexec.1 | sed -e '/CreationDate:/d' > t-$@
168 msgfilter.1.html: msgfilter.1
169 $(MAN2HTML) `if test -f msgfilter.1; then echo .; else echo $(srcdir); fi`/msgfilter.1 | sed -e '/CreationDate:/d' > t-$@
171 msggrep.1.html: msggrep.1
172 $(MAN2HTML) `if test -f msggrep.1; then echo .; else echo $(srcdir); fi`/msggrep.1 | sed -e '/CreationDate:/d' > t-$@
174 msginit.1.html: msginit.1
175 $(MAN2HTML) `if test -f msginit.1; then echo .; else echo $(srcdir); fi`/msginit.1 | sed -e '/CreationDate:/d' > t-$@
177 msguniq.1.html: msguniq.1
178 $(MAN2HTML) `if test -f msguniq.1; then echo .; else echo $(srcdir); fi`/msguniq.1 | sed -e '/CreationDate:/d' > t-$@
180 gettextize.1.html: gettextize.1
181 $(MAN2HTML) `if test -f gettextize.1; then echo .; else echo $(srcdir); fi`/gettextize.1 | sed -e '/CreationDate:/d' > t-$@
183 autopoint.1.html: autopoint.1
184 $(MAN2HTML) `if test -f autopoint.1; then echo .; else echo $(srcdir); fi`/autopoint.1 | sed -e '/CreationDate:/d' > t-$@
188 $(mkinstalldirs) $(DESTDIR)$(htmldir)
189 for file in $(man_HTML); do \
190 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
191 $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
195 $(mkinstalldirs) $(DESTDIR)$(htmldir)
198 for file in $(man_HTML); do \
199 $(RM) $(DESTDIR)$(htmldir)/$$file; \
205 EXTRA_DIST += Makefile.vms
210 EXTRA_DIST += Makefile.msvc