1 ## Makefile for the gettext-tools/doc subdirectory of GNU gettext
2 ## Copyright (C) 1995-1997, 2001-2005 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.
26 AUTOMAKE_OPTIONS = 1.2 gnits
29 TEXINCLUDES = -I $(top_srcdir)/../gettext-runtime/doc
34 MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
35 MAKEINFOFLAGS = $(TEXINCLUDES) --no-split
37 info_TEXINFOS = gettext.texi
38 # List of texinfo sources @included by gettext.texi, excluding version.texi.
40 xgettext.texi msginit.texi msgmerge.texi msgcat.texi msgconv.texi \
41 msggrep.texi msgfilter.texi msguniq.texi msgcomm.texi msgcmp.texi \
42 msgattrib.texi msgen.texi msgexec.texi msgfmt.texi msgunfmt.texi \
43 gettextize.texi autopoint.texi iso-639.texi iso-3166.texi \
44 $(top_srcdir)/../gettext-runtime/doc/rt-gettext.texi \
45 $(top_srcdir)/../gettext-runtime/doc/rt-ngettext.texi \
46 $(top_srcdir)/../gettext-runtime/doc/rt-envsubst.texi
48 # The FAQ. To be edited with Mozilla.
49 # The tutorial. To be edited by hand.
50 doc_DATA = FAQ.html tutorial.html
51 EXTRA_DIST += $(doc_DATA)
54 iso-639.sed iso-3166.sed ISO_639 ISO_3166 ISO_3166_de texi2html \
57 iso-639.texi: ISO_639 iso-639.sed
58 $(SED) -f $(srcdir)/iso-639.sed $(srcdir)/ISO_639 > iso-639.tmp
59 rm -f $(srcdir)/iso-639.texi
60 mv iso-639.tmp $(srcdir)/iso-639.texi
62 iso-3166.texi: ISO_3166 iso-3166.sed
63 $(SED) -f $(srcdir)/iso-3166.sed $(srcdir)/ISO_3166 > iso-3166.tmp
64 rm -f $(srcdir)/iso-3166.texi
65 mv iso-3166.tmp $(srcdir)/iso-3166.texi
67 # The dependencies of stamp-vti generated by automake are incomplete.
68 # So we have to duplicate the entire rule which would otherwise be generated
70 $(srcdir)/stamp-vti: $(info_TEXINFOS) $(gettext_TEXINFOS) $(top_srcdir)/../version.sh
71 (dir=.; test -f ./gettext.texi || dir=$(srcdir); \
72 set `$(SHELL) $(top_srcdir)/../build-aux/mdate-sh $$dir/gettext.texi`; \
73 echo "@set UPDATED $$1 $$2 $$3"; \
74 echo "@set UPDATED-MONTH $$2 $$3"; \
75 echo "@set EDITION $(VERSION)"; \
76 echo "@set VERSION $(VERSION)") > vti.tmp
77 cmp -s vti.tmp version.texi \
78 || (echo "Updating version.texi"; \
79 cp vti.tmp version.texi)
83 # We distribute only the split HTML documentation.
84 # The user can generate the others, via
90 install-data-local: install-html
91 installdirs-local: installdirs-html
92 uninstall-local: uninstall-html
93 # Hidden from automake, but really activated. Works around an automake-1.5 bug.
96 html-local: html-split
97 install-html: install-html-split
98 uninstall-html: uninstall-html-split
99 dist-html: dist-html-split
101 CLEANFILES = gettext.pdf gettext.html
102 # gettext.dvi and gettext.ps are already known to automake.
103 MAINTAINERCLEANFILES = gettext_*.html
106 # Documentation in DVI format.
108 # Override of automake's definition:
110 TEXI2DVI = texi2dvi $(TEXINCLUDES)
112 install-dvi: gettext.dvi
113 $(mkinstalldirs) $(DESTDIR)$(dvidir)
114 $(INSTALL_DATA) `if test -f gettext.dvi; then echo .; else echo $(srcdir); fi`/gettext.dvi $(DESTDIR)$(dvidir)/gettext.dvi
117 $(mkinstalldirs) $(DESTDIR)$(dvidir)
120 $(RM) $(DESTDIR)$(dvidir)/gettext.dvi
122 # Temporary index files. automake removes only the predefined ones by itself.
123 MOSTLYCLEANFILES += \
124 gettext.am gettext.ams \
125 gettext.cp gettext.cps \
126 gettext.ef gettext.efs \
127 gettext.em gettext.ems \
128 gettext.ev gettext.evs \
129 gettext.fn gettext.fns \
130 gettext.kw gettext.kws \
131 gettext.op gettext.ops \
132 gettext.pg gettext.pgs \
133 gettext.vr gettext.vrs
136 # Documentation in Postscript format.
138 # Override of automake's definition:
140 DVIPS = @DVIPS@ -D600
142 gettext.ps: gettext.dvi
143 $(DVIPS) -o $@ `if test -f gettext.dvi; then echo gettext.dvi; else echo $(srcdir)/gettext.dvi; fi`
145 install-ps: gettext.ps
146 $(mkinstalldirs) $(DESTDIR)$(psdir)
147 $(INSTALL_DATA) `if test -f gettext.ps; then echo .; else echo $(srcdir); fi`/gettext.ps $(DESTDIR)$(psdir)/gettext.ps
150 $(mkinstalldirs) $(DESTDIR)$(psdir)
153 $(RM) $(DESTDIR)$(psdir)/gettext.ps
156 # Documentation in Portable Document Format.
158 # Override of automake's definition:
159 #TEXI2PDF = @TEXI2PDF@
160 TEXI2PDF = @TEXI2PDF@ $(TEXINCLUDES)
163 install-pdf: gettext.pdf
164 $(mkinstalldirs) $(DESTDIR)$(pdfdir)
165 $(INSTALL_DATA) `if test -f gettext.pdf; then echo .; else echo $(srcdir); fi`/gettext.pdf $(DESTDIR)$(pdfdir)/gettext.pdf
168 $(mkinstalldirs) $(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 gettext.html: gettext.texi version.texi $(gettext_TEXINFOS)
184 $(TEXI2HTML) $(TEXINCLUDES) -expandinfo -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) -expandinfo -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) -expandinfo -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 $(mkinstalldirs) $(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 $(mkinstalldirs) $(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 $(mkinstalldirs) $(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 $(mkinstalldirs) $(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.
221 $(mkinstalldirs) $(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; \
231 EXTRA_DIST += Makefile.vms
236 EXTRA_DIST += Makefile.msvc