1 ## Makefile for the gettext-tools/doc subdirectory of GNU gettext
2 ## Copyright (C) 1995-1997, 2001-2007, 2009, 2015 Free Software
5 ## This program is free software: you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 3 of the License, or
8 ## (at your option) any later version.
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
18 ## Process this file with automake to produce Makefile.in.
20 AUTOMAKE_OPTIONS = 1.2 gnits
24 # List of -I options referring to directories that contain texinfo
25 # sources used by this directory.
26 TEXINCLUDES = -I $(top_srcdir)/../gettext-runtime/doc
31 MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
32 MAKEINFOFLAGS = $(TEXINCLUDES) --no-split
34 info_TEXINFOS = gettext.texi
35 # List of texinfo sources @included by gettext.texi, excluding version.texi.
37 xgettext.texi msginit.texi msgmerge.texi msgcat.texi msgconv.texi \
38 msggrep.texi msgfilter.texi msguniq.texi msgcomm.texi msgcmp.texi \
39 msgattrib.texi msgen.texi msgexec.texi msgfmt.texi msgunfmt.texi \
40 gettextize.texi autopoint.texi iso-639.texi iso-639-2.texi iso-3166.texi \
41 gpl.texi lgpl.texi fdl.texi \
42 $(top_srcdir)/../gettext-runtime/doc/rt-gettext.texi \
43 $(top_srcdir)/../gettext-runtime/doc/rt-ngettext.texi \
44 $(top_srcdir)/../gettext-runtime/doc/rt-envsubst.texi
46 # The FAQ. To be edited with Mozilla.
47 # The tutorial. To be edited by hand.
48 doc_DATA = FAQ.html tutorial.html
49 EXTRA_DIST += $(doc_DATA)
52 iso-639.sed iso-639-2.sed iso-3166.sed \
53 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
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)"; \
81 echo "@set ARCHIVE-VERSION $(ARCHIVE_VERSION)") > vti.tmp
82 cmp -s vti.tmp version.texi \
83 || (echo "Updating version.texi"; \
84 cp vti.tmp version.texi)
88 # We distribute only the split HTML documentation.
89 # The user can generate the others, via
95 install-data-local: install-html
96 installdirs-local: installdirs-html
97 uninstall-local: uninstall-html
100 html-local: html-split
101 # Override of automake's definition. The HTML files we want to distribute are
102 # not the ones that automake knows about, and we cannot define HTMLS to a value
103 # containing wildcards.
104 install-html: install-html-split
106 uninstall-html: uninstall-html-split
107 dist-html: dist-html-split
109 # CLEANFILES: gettext.{dvi,ps,pdf,html} are already known to automake.
110 MAINTAINERCLEANFILES = gettext_*.html
113 # Documentation in DVI format.
115 # Override of automake's definition:
117 TEXI2DVI = texi2dvi $(TEXINCLUDES)
119 # The install-dvi target is already defined by automake.
122 $(MKDIR_P) $(DESTDIR)$(dvidir)
125 $(RM) $(DESTDIR)$(dvidir)/gettext.dvi
127 # Temporary index files. automake removes only the predefined ones by itself.
128 MOSTLYCLEANFILES += \
129 gettext.am gettext.ams \
130 gettext.cp gettext.cps \
131 gettext.ef gettext.efs \
132 gettext.em gettext.ems \
133 gettext.ev gettext.evs \
134 gettext.fn gettext.fns \
135 gettext.kw gettext.kws \
136 gettext.op gettext.ops \
137 gettext.pg gettext.pgs \
138 gettext.vr gettext.vrs
141 # Documentation in Postscript format.
143 # Override of automake's definition:
145 DVIPS = @DVIPS@ -D600
147 gettext.ps: gettext.dvi
148 $(DVIPS) -o $@ `if test -f gettext.dvi; then echo gettext.dvi; else echo $(srcdir)/gettext.dvi; fi`
150 # The install-ps target is already defined by automake.
153 $(MKDIR_P) $(DESTDIR)$(psdir)
156 $(RM) $(DESTDIR)$(psdir)/gettext.ps
159 # Documentation in Portable Document Format.
161 # Override of automake's definition:
162 #TEXI2PDF = @TEXI2PDF@
163 TEXI2PDF = @TEXI2PDF@ $(TEXINCLUDES)
165 # The install-pdf target is already defined by automake.
168 $(MKDIR_P) $(DESTDIR)$(pdfdir)
171 $(RM) $(DESTDIR)$(pdfdir)/gettext.pdf
174 # Documentation in HTML format.
176 TEXI2HTML = @PERL@ $(srcdir)/texi2html
178 html-monolithic: gettext.html
179 html-split: gettext_toc.html
181 # Override of automake's definition.
182 # We want to use texi2html, not makeinfo --html.
183 # Newer versions of texi2html also need the options --no-menu --no-sec-nav.
184 gettext.html: gettext.texi version.texi $(gettext_TEXINFOS)
185 $(TEXI2HTML) $(TEXINCLUDES) -number -monolithic `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi`
187 gettext_toc.html: gettext.texi version.texi $(gettext_TEXINFOS)
190 $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` || exit 0 ;; \
191 *) $(RM) gettext_*.html ; \
192 $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` ;; \
195 install-html-monolithic: gettext.html
196 $(MKDIR_P) $(DESTDIR)$(htmldir)
197 $(INSTALL_DATA) `if test -f gettext.html; then echo .; else echo $(srcdir); fi`/gettext.html $(DESTDIR)$(htmldir)/gettext.html
199 install-html-split: gettext_toc.html
200 $(MKDIR_P) $(DESTDIR)$(htmldir)
201 for file in `if test -f gettext_toc.html; then echo .; else echo $(srcdir); fi`/gettext_*.html; do \
202 $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \
206 $(MKDIR_P) $(DESTDIR)$(htmldir)
208 uninstall-html-monolithic:
209 $(RM) $(DESTDIR)$(htmldir)/gettext.html
211 uninstall-html-split:
212 $(RM) $(DESTDIR)$(htmldir)/gettext_*.html
214 dist-html-monolithic:
215 $(MKDIR_P) $(distdir)/
217 if test -f $$file; then d=.; else d=$(srcdir); fi; \
218 cp -p $$d/$$file $(distdir)/$$file || exit 1
220 # We would like to put gettext_*.html into EXTRA_DIST, but it doesn't work.
221 dist-html-split: gettext_toc.html
222 $(MKDIR_P) $(distdir)/
223 file=gettext_toc.html; \
224 if test -f $$file; then d=.; else d=$(srcdir); fi; \
225 for file in `cd $$d && echo gettext_*.html`; do \
226 cp -p $$d/$$file $(distdir)/$$file || exit 1; \