]> code.delx.au - gnu-emacs/blob - doc/misc/Makefile.in
lisp/gnus/gnus-start.el (gnus-activate-group): Fix typo reported by Tim Landscheidt
[gnu-emacs] / doc / misc / Makefile.in
1 ### @configure_input@
2
3 # Copyright (C) 1994, 1996-2014 Free Software Foundation, Inc.
4
5 # This file is part of GNU Emacs.
6
7 # GNU Emacs is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20 SHELL = @SHELL@
21
22 # Where to find the source code. $(srcdir) will be the doc/misc subdirectory
23 # of the source tree. This is set by configure's `--srcdir' option.
24 srcdir=@srcdir@
25
26 version=@version@
27
28 ## Where the output files go.
29 ## Note that all the Info targets build the Info files in srcdir.
30 ## There is no provision for Info files to exist in the build directory.
31 ## In a tarfile of Emacs, the Info files should be up to date.
32 buildinfodir = $(srcdir)/../../info
33
34 ## Directory with emacsver.texi.
35 emacsdir = $(srcdir)/../emacs
36
37 prefix = @prefix@
38 datarootdir = @datarootdir@
39 datadir = @datadir@
40 PACKAGE_TARNAME = @PACKAGE_TARNAME@
41 docdir = @docdir@
42 dvidir = @dvidir@
43 htmldir = @htmldir@
44 pdfdir = @pdfdir@
45 psdir = @psdir@
46
47 MKDIR_P = @MKDIR_P@
48
49 GZIP_PROG = @GZIP_PROG@
50
51 HTML_OPTS = --no-split --html
52
53 # Options used only when making info output.
54 # (Note that idlwave, info used --nosplit even without the .info extension.)
55 INFO_OPTS= --no-split
56
57 INSTALL = @INSTALL@
58 INSTALL_DATA = @INSTALL_DATA@
59
60 # The makeinfo program is part of the Texinfo distribution.
61 # Use --force so that it generates output even if there are errors.
62 # (TODO? Why is this appropriate?)
63 MAKEINFO = @MAKEINFO@
64 MAKEINFO_OPTS = --force -I$(emacsdir)
65
66 ## On MS Windows, efaq-w32; otherwise blank.
67 DOCMISC_W32 = @DOCMISC_W32@
68
69 ## Info files to build and install on all platforms.
70 INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \
71 dbus dired-x ebrowse ede ediff edt eieio \
72 emacs-mime epa erc ert eshell eudc efaq eww \
73 flymake forms gnus emacs-gnutls htmlfontify idlwave ido info.info \
74 mairix-el message mh-e newsticker nxml-mode octave-mode \
75 org pcl-cvs pgg rcirc remember reftex sasl \
76 sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp \
77 url vhdl-mode vip viper widget wisent woman
78
79 ## Info files to install on current platform.
80 INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32)
81
82 ## Info files to build on current platform.
83 ## This is all of them, even though they might not all get installed,
84 ## because the info files are pre-built in release tarfiles.
85 INFO_TARGETS = $(INFO_COMMON) efaq-w32
86
87 # There are some naming differences between the info targets and the other
88 # targets, so let's resolve them here.
89 TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode)
90 TARGETS = $(TARGETS_1:info.info=info)
91
92 DVI_TARGETS = $(TARGETS:=.dvi)
93 HTML_TARGETS = $(TARGETS:=.html)
94 PDF_TARGETS = $(TARGETS:=.pdf)
95 PS_TARGETS = $(TARGETS:=.ps)
96
97 TEXI2DVI = texi2dvi
98 TEXI2PDF = texi2pdf
99 DVIPS = dvips
100
101 ENVADD = TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
102 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
103
104 gfdl = ${srcdir}/doclicense.texi
105
106 .PHONY: info dvi html pdf ps echo-info $(INFO_TARGETS)
107 ## Prevent implicit rule triggering for foo.info.
108 .SUFFIXES:
109
110 ## Disable implicit rules.
111 %.texi: ;
112
113 # Default.
114 info: $(INFO_TARGETS)
115
116 ## Used by top-level Makefile.
117 ## Base file names of output info files.
118 echo-info:
119 @echo "$(INFO_INSTALL) " | \
120 sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */.info /g"
121
122 dvi: $(DVI_TARGETS)
123
124 html: $(HTML_TARGETS)
125
126 pdf: $(PDF_TARGETS)
127
128 ps: $(PS_TARGETS)
129
130 ${buildinfodir}:
131 ${MKDIR_P} $@
132
133 ### The general case.
134
135 EXTRA_OPTS =
136
137 ${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} | ${buildinfodir}
138 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) -o $@ $<
139
140 ## The short aliases, eg efaq = $(buildinfodir)/efaq.info.
141 define info_template
142 $(1): $$(buildinfodir)/$(1).info
143 endef
144
145 ## "info" is already taken.
146 info.info: $(buildinfodir)/info.info
147
148 $(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile))))
149
150
151 %.dvi: ${srcdir}/%.texi ${gfdl}
152 $(ENVADD) $(TEXI2DVI) $<
153
154 %.pdf: ${srcdir}/%.texi ${gfdl}
155 $(ENVADD) $(TEXI2PDF) $<
156
157 %.html: ${srcdir}/%.texi ${gfdl}
158 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) -o $@ $<
159
160 %.ps: %.dvi
161 $(DVIPS) -o $@ $<
162
163
164 ### The exceptions.
165
166 ## Extra dependencies.
167
168 need_emacsver = calc cl dired-x efaq efaq-w32 erc ido reftex woman
169 need_emacsver_prefix = $(addprefix ${buildinfodir}/,${need_emacsver})
170
171 $(need_emacsver_prefix:=.info) $(need_emacsver:=.dvi) $(need_emacsver:=.pdf) $(need_emacsver:=.html) : ${emacsdir}/emacsver.texi
172
173 $(buildinfodir)/gnus.info gnus.html: ${srcdir}/gnus-faq.texi
174
175 $(buildinfodir)/semantic.info semantic.dvi semantic.pdf semantic.html: ${srcdir}/sem-user.texi
176
177
178 ## Please can we just rename cc-mode.texi to ccmode.texi...
179 ${buildinfodir}/ccmode.info: ${srcdir}/cc-mode.texi ${gfdl} | ${buildinfodir}
180 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
181
182 ## efaq, efaq_w32 do not depend on gfdl.
183 ## Maybe we can use .SECONDEXPANSION for this.
184 ${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi | ${buildinfodir}
185 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
186
187 efaq%.dvi: ${srcdir}/efaq%.texi
188 $(ENVADD) $(TEXI2DVI) $<
189
190 efaq%.pdf: ${srcdir}/efaq%.texi
191 $(ENVADD) $(TEXI2PDF) $<
192
193 efaq%.html: ${srcdir}/efaq%.texi
194 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
195
196 ${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding
197
198 gnus_deps = ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi ${gfdl}
199 gnus.dvi: $(gnus_deps)
200 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmpdvi.texi
201 $(ENVADD) $(TEXI2DVI) gnustmpdvi.texi
202 cp gnustmpdvi.dvi $@
203 rm gnustmpdvi.*
204
205 gnus.pdf: $(gnus_deps)
206 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmppdf.texi
207 $(ENVADD) $(TEXI2PDF) gnustmppdf.texi
208 cp gnustmppdf.pdf $@
209 rm gnustmppdf.*
210
211 ${buildinfodir}/tramp.info tramp.html: EXTRA_OPTS = -D emacs
212 ${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
213
214
215 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
216
217 mostlyclean:
218 rm -f *.aux *.log *.toc *.c[mp] *.c[mp]s *.fn *.fns \
219 *.ky *.kys *.op *.ops *.p[gj] *.p[gj]s *.sc *.scs *.ss \
220 *.t[gp] *.t[gp]s *.vr *.vrs
221 rm -f gnustmp*
222
223 clean: mostlyclean
224 rm -f *.dvi *.html *.pdf *.ps
225 rm -f emacs-misc-${version}.tar*
226
227 distclean: clean
228 rm -f Makefile
229
230 ## buildinfodir is relative to srcdir.
231 infoclean:
232 for file in $(INFO_TARGETS); do \
233 file=`echo $${file} | sed 's/\.info$$//'`.info; \
234 rm -f \
235 $(buildinfodir)/$${file} \
236 $(buildinfodir)/$${file}-[1-9] \
237 $(buildinfodir)/$${file}-[1-9][0-9]; \
238 done
239
240 bootstrap-clean maintainer-clean: distclean infoclean
241
242 dist:
243 rm -rf emacs-misc-${version}
244 mkdir emacs-misc-${version}
245 cp ${srcdir}/*.texi ${srcdir}/texinfo.tex \
246 $(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \
247 emacs-misc-${version}/
248 sed -e 's/@sr[c]dir@/./' \
249 -e 's/^\(emacsdir *=\).*/\1 ./' \
250 -e 's/^\(buildinfodir *=\).*/\1 ./' \
251 -e 's/^\(clean:.*\)/\1 infoclean/' \
252 -e "s/@ver[s]ion@/${version}/" \
253 -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
254 -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
255 -e 's|@SH[E]LL@|/bin/bash|' \
256 -e 's|@[p]refix@|/usr/local|' \
257 -e 's|@[d]atarootdir@|$${prefix}/share|' \
258 -e 's|@[d]atadir@|$${datarootdir}|' \
259 -e 's|@[P]ACKAGE_TARNAME@|emacs|' \
260 -e 's|@[d]ocdir@|$${datarootdir}/doc/$${PACKAGE_TARNAME}|' \
261 -e 's|@[d]vidir@|$${docdir}|' \
262 -e 's|@[h]tmldir@|$${docdir}|' \
263 -e 's|@[p]dfdir@|$${docdir}|' \
264 -e 's|@[p]sdir@|$${docdir}|' \
265 -e 's|@[G]ZIP_PROG@|gzip|' \
266 -e 's|@IN[S]TALL@|install -c|' \
267 -e 's|@IN[S]TALL_DATA@|$${INSTALL} -m 644|' \
268 -e '/@[c]onfigure_input@/d' \
269 ${srcdir}/Makefile.in > emacs-misc-${version}/Makefile
270 @if grep '@[a-zA-Z_]*@' emacs-misc-${version}/Makefile; then \
271 echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
272 fi
273 tar -cf emacs-misc-${version}.tar emacs-misc-${version}
274 rm -rf emacs-misc-${version}
275
276
277 .PHONY: install-dvi install-html install-pdf install-ps install-doc
278
279 install-dvi: dvi
280 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
281 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
282 install-html: html
283 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
284 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
285 install-pdf: pdf
286 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
287 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
288 install-ps: ps
289 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
290 for file in $(PS_TARGETS); do \
291 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
292 [ -n "${GZIP_PROG}" ] || continue; \
293 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
294 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
295 done
296
297 ## Top-level Makefile installs the info pages.
298 install-doc: install-dvi install-html install-pdf install-ps
299
300
301
302 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
303
304 uninstall-dvi:
305 for file in $(DVI_TARGETS); do \
306 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
307 done
308 uninstall-html:
309 for file in $(HTML_TARGETS); do \
310 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
311 done
312 uninstall-ps:
313 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
314 for file in $(PS_TARGETS); do \
315 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
316 done
317 uninstall-pdf:
318 for file in $(PDF_TARGETS); do \
319 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
320 done
321
322 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
323
324
325 ### Makefile ends here