1 ## Makefile for the gettext-tools/doc subdirectory of GNU gettext
2 ## Copyright (C) 1995-1997, 2001-2007, 2009 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.
19 AUTOMAKE_OPTIONS = 1.2 gnits
23 # List of -I options referring to directories that contain texinfo
24 # sources used by this directory.
25 TEXINCLUDES = -I $(top_srcdir)/../gettext-runtime/doc
30 MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
31 MAKEINFOFLAGS = $(TEXINCLUDES) --no-split
33 info_TEXINFOS = gettext.texi
34 # List of texinfo sources @included by gettext.texi, excluding version.texi.
36 xgettext.texi msginit.texi msgmerge.texi msgcat.texi msgconv.texi \
37 msggrep.texi msgfilter.texi msguniq.texi msgcomm.texi msgcmp.texi \
38 msgattrib.texi msgen.texi msgexec.texi msgfmt.texi msgunfmt.texi \
39 gettextize.texi autopoint.texi iso-639.texi iso-639-2.texi iso-3166.texi \
40 gpl.texi lgpl.texi fdl.texi \
41 $(top_srcdir)/../gettext-runtime/doc/rt-gettext.texi \
42 $(top_srcdir)/../gettext-runtime/doc/rt-ngettext.texi \
43 $(top_srcdir)/../gettext-runtime/doc/rt-envsubst.texi
45 # The FAQ. To be edited with Mozilla.
46 # The tutorial. To be edited by hand.
47 doc_DATA = FAQ.html tutorial.html
48 EXTRA_DIST += $(doc_DATA)
51 iso-639.sed iso-639-2.sed iso-3166.sed \
52 ISO_639 ISO_639-2 ISO_3166 ISO_3166_de \
56 iso-639.texi: ISO_639 iso-639.sed
57 $(SED) -f $(srcdir)/iso-639.sed $(srcdir)/ISO_639 > iso-639.tmp
58 rm -f $(srcdir)/iso-639.texi
59 mv iso-639.tmp $(srcdir)/iso-639.texi
61 iso-639-2.texi: ISO_639-2 iso-639-2.sed
62 $(SED) -f $(srcdir)/iso-639-2.sed $(srcdir)/ISO_639-2 > iso-639-2.tmp
63 rm -f $(srcdir)/iso-639-2.texi
64 mv iso-639-2.tmp $(srcdir)/iso-639-2.texi
66 iso-3166.texi: ISO_3166 iso-3166.sed
67 $(SED) -f $(srcdir)/iso-3166.sed $(srcdir)/ISO_3166 > iso-3166.tmp
68 rm -f $(srcdir)/iso-3166.texi
69 mv iso-3166.tmp $(srcdir)/iso-3166.texi
71 # The dependencies of stamp-vti generated by automake are incomplete.
72 # So we have to duplicate the entire rule which would otherwise be generated
74 $(srcdir)/stamp-vti: $(info_TEXINFOS) $(gettext_TEXINFOS) $(top_srcdir)/../version.sh
75 (dir=.; test -f ./gettext.texi || dir=$(srcdir); \
76 set `$(SHELL) $(top_srcdir)/../build-aux/mdate-sh $$dir/gettext.texi`; \
77 echo "@set UPDATED $$1 $$2 $$3"; \
78 echo "@set UPDATED-MONTH $$2 $$3"; \
79 echo "@set EDITION $(VERSION)"; \
80 echo "@set VERSION $(VERSION)") > vti.tmp
81 cmp -s vti.tmp version.texi \
82 || (echo "Updating version.texi"; \
83 cp vti.tmp version.texi)
87 # We distribute only the split HTML documentation.
88 # The user can generate the others, via
94 install-data-local: install-html
95 installdirs-local: installdirs-html
96 uninstall-local: uninstall-html
99 html-local: html-split
100 # Override of automake's definition. The HTML files we want to distribute are
101 # not the ones that automake knows about, and we cannot define HTMLS to a value
102 # containing wildcards.
103 install-html: install-html-split
105 uninstall-html: uninstall-html-split
106 dist-html: dist-html-split
108 # CLEANFILES: gettext.{dvi,ps,pdf,html} are already known to automake.
109 MAINTAINERCLEANFILES = gettext_*.html
112 # Documentation in DVI format.
114 # Override of automake's definition:
116 TEXI2DVI = texi2dvi $(TEXINCLUDES)
118 # The install-dvi target is already defined by automake.
121 $(mkdir_p) $(DESTDIR)$(dvidir)
124 $(RM) $(DESTDIR)$(dvidir)/gettext.dvi
126 # Temporary index files. automake removes only the predefined ones by itself.
127 MOSTLYCLEANFILES += \
128 gettext.am gettext.ams \
129 gettext.cp gettext.cps \
130 gettext.ef gettext.efs \
131 gettext.em gettext.ems \
132 gettext.ev gettext.evs \
133 gettext.fn gettext.fns \
134 gettext.kw gettext.kws \
135 gettext.op gettext.ops \
136 gettext.pg gettext.pgs \
137 gettext.vr gettext.vrs
140 # Documentation in Postscript format.
142 # Override of automake's definition:
144 DVIPS = @DVIPS@ -D600
146 gettext.ps: gettext.dvi
147 $(DVIPS) -o $@ `if test -f gettext.dvi; then echo gettext.dvi; else echo $(srcdir)/gettext.dvi; fi`
149 # The install-ps target is already defined by automake.
152 $(mkdir_p) $(DESTDIR)$(psdir)
155 $(RM) $(DESTDIR)$(psdir)/gettext.ps
158 # Documentation in Portable Document Format.
160 # Override of automake's definition:
161 #TEXI2PDF = @TEXI2PDF@
162 TEXI2PDF = @TEXI2PDF@ $(TEXINCLUDES)
164 # The install-pdf target is already defined by automake.
167 $(mkdir_p) $(DESTDIR)$(pdfdir)
170 $(RM) $(DESTDIR)$(pdfdir)/gettext.pdf
173 # Documentation in HTML format.
175 TEXI2HTML = @PERL@ $(srcdir)/texi2html
177 html-monolithic: gettext.html
178 html-split: gettext_toc.html
180 # Override of automake's definition.
181 # We want to use texi2html, not makeinfo --html.
182 # Newer versions of texi2html also need the options --no-menu --no-sec-nav.
183 gettext.html: gettext.texi version.texi $(gettext_TEXINFOS)
184 $(TEXI2HTML) $(TEXINCLUDES) -number -monolithic `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi`
186 gettext_toc.html: gettext.texi version.texi $(gettext_TEXINFOS)
189 $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` || exit 0 ;; \
190 *) $(RM) gettext_*.html ; \
191 $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` ;; \
194 install-html-monolithic: gettext.html
195 $(mkdir_p) $(DESTDIR)$(htmldir)
196 $(INSTALL_DATA) `if test -f gettext.html; then echo .; else echo $(srcdir); fi`/gettext.html $(DESTDIR)$(htmldir)/gettext.html
198 install-html-split: gettext_toc.html
199 $(mkdir_p) $(DESTDIR)$(htmldir)
200 for file in `if test -f gettext_toc.html; then echo .; else echo $(srcdir); fi`/gettext_*.html; do \
201 $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \
205 $(mkdir_p) $(DESTDIR)$(htmldir)
207 uninstall-html-monolithic:
208 $(RM) $(DESTDIR)$(htmldir)/gettext.html
210 uninstall-html-split:
211 $(RM) $(DESTDIR)$(htmldir)/gettext_*.html
213 dist-html-monolithic:
214 $(mkdir_p) $(distdir)/
216 if test -f $$file; then d=.; else d=$(srcdir); fi; \
217 cp -p $$d/$$file $(distdir)/$$file || exit 1
219 # We would like to put gettext_*.html into EXTRA_DIST, but it doesn't work.
220 dist-html-split: gettext_toc.html
221 $(mkdir_p) $(distdir)/
222 file=gettext_toc.html; \
223 if test -f $$file; then d=.; else d=$(srcdir); fi; \
224 for file in `cd $$d && echo gettext_*.html`; do \
225 cp -p $$d/$$file $(distdir)/$$file || exit 1; \