tildify.el: introduce a `tildify-foreach-region-function' variable
[emacs/old-mirror.git] / doc / misc / Makefile.in
blob40a072a7978501fa5b224e872aea71405e144561
1 ### @configure_input@
3 # Copyright (C) 1994, 1996-2014 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
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.
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.
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/>.
20 SHELL = @SHELL@
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@
26 ## Where the output files go.
27 ## Note that all the Info targets build the Info files in srcdir.
28 ## There is no provision for Info files to exist in the build directory.
29 ## In a tarfile of Emacs, the Info files should be up to date.
30 buildinfodir = $(srcdir)/../../info
32 ## Directory with emacsver.texi.
33 emacsdir = $(srcdir)/../emacs
35 prefix = @prefix@
36 datarootdir = @datarootdir@
37 datadir = @datadir@
38 PACKAGE_TARNAME = @PACKAGE_TARNAME@
39 docdir = @docdir@
40 dvidir = @dvidir@
41 htmldir = @htmldir@
42 pdfdir = @pdfdir@
43 psdir = @psdir@
45 MKDIR_P = @MKDIR_P@
47 GZIP_PROG = @GZIP_PROG@
49 HTML_OPTS = --no-split --html
51 # Options used only when making info output.
52 # (Note that idlwave, info used --nosplit even without the .info extension.)
53 INFO_OPTS= --no-split
55 INSTALL = @INSTALL@
56 INSTALL_DATA = @INSTALL_DATA@
58 # The makeinfo program is part of the Texinfo distribution.
59 # Use --force so that it generates output even if there are errors.
60 # (TODO? Why is this appropriate?)
61 MAKEINFO = @MAKEINFO@
62 MAKEINFO_OPTS = --force -I$(emacsdir)
64 ## On MS Windows, efaq-w32; otherwise blank.
65 DOCMISC_W32 = @DOCMISC_W32@
67 ## Info files to build and install on all platforms.
68 INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \
69 dbus dired-x ebrowse ede ediff edt eieio \
70 emacs-mime epa erc ert eshell eudc efaq eww \
71 flymake forms gnus emacs-gnutls htmlfontify idlwave ido info.info \
72 mairix-el message mh-e newsticker nxml-mode octave-mode \
73 org pcl-cvs pgg rcirc remember reftex sasl \
74 sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp \
75 url vhdl-mode vip viper widget wisent woman
77 ## Info files to install on current platform.
78 INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32)
80 ## Info files to build on current platform.
81 ## This is all of them, even though they might not all get installed,
82 ## because the info files are pre-built in release tarfiles.
83 INFO_TARGETS = $(INFO_COMMON) efaq-w32
85 # There are some naming differences between the info targets and the other
86 # targets, so let's resolve them here.
87 TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode)
88 TARGETS = $(TARGETS_1:info.info=info)
90 DVI_TARGETS = $(TARGETS:=.dvi)
91 HTML_TARGETS = $(TARGETS:=.html)
92 PDF_TARGETS = $(TARGETS:=.pdf)
93 PS_TARGETS = $(TARGETS:=.ps)
95 TEXI2DVI = texi2dvi
96 TEXI2PDF = texi2pdf
97 DVIPS = dvips
99 ENVADD = TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
100 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
102 gfdl = ${srcdir}/doclicense.texi
104 .PHONY: info dvi html pdf ps echo-info $(INFO_TARGETS)
105 ## Prevent implicit rule triggering for foo.info.
106 .SUFFIXES:
108 ## Disable implicit rules.
109 %.texi: ;
111 # Default.
112 info: $(INFO_TARGETS)
114 ## Used by top-level Makefile.
115 ## Base file names of output info files.
116 echo-info:
117 @echo "$(INFO_INSTALL) " | \
118 sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */.info /g"
120 dvi: $(DVI_TARGETS)
122 html: $(HTML_TARGETS)
124 pdf: $(PDF_TARGETS)
126 ps: $(PS_TARGETS)
128 ${buildinfodir}:
129 ${MKDIR_P} $@
131 ### The general case.
133 EXTRA_OPTS =
135 ${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} | ${buildinfodir}
136 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) -o $@ $<
138 ## The short aliases, eg efaq = $(buildinfodir)/efaq.info.
139 define info_template
140 $(1): $$(buildinfodir)/$(1).info
141 endef
143 ## "info" is already taken.
144 info.info: $(buildinfodir)/info.info
146 $(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile))))
149 %.dvi: ${srcdir}/%.texi ${gfdl}
150 $(ENVADD) $(TEXI2DVI) $<
152 %.pdf: ${srcdir}/%.texi ${gfdl}
153 $(ENVADD) $(TEXI2PDF) $<
155 %.html: ${srcdir}/%.texi ${gfdl}
156 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) -o $@ $<
158 %.ps: %.dvi
159 $(DVIPS) -o $@ $<
162 ### The exceptions.
164 ## Extra dependencies.
166 need_emacsver = calc cl dired-x efaq efaq-w32 erc ido reftex woman
167 need_emacsver_prefix = $(addprefix ${buildinfodir}/,${need_emacsver})
169 $(need_emacsver_prefix:=.info) $(need_emacsver:=.dvi) $(need_emacsver:=.pdf) $(need_emacsver:=.html) : ${emacsdir}/emacsver.texi
171 $(buildinfodir)/gnus.info gnus.html: ${srcdir}/gnus-faq.texi
173 $(buildinfodir)/semantic.info semantic.dvi semantic.pdf semantic.html: ${srcdir}/sem-user.texi
176 ## Please can we just rename cc-mode.texi to ccmode.texi...
177 ${buildinfodir}/ccmode.info: ${srcdir}/cc-mode.texi ${gfdl} | ${buildinfodir}
178 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
180 ## efaq, efaq_w32 do not depend on gfdl.
181 ## Maybe we can use .SECONDEXPANSION for this.
182 ${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi | ${buildinfodir}
183 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
185 efaq%.dvi: ${srcdir}/efaq%.texi
186 $(ENVADD) $(TEXI2DVI) $<
188 efaq%.pdf: ${srcdir}/efaq%.texi
189 $(ENVADD) $(TEXI2PDF) $<
191 efaq%.html: ${srcdir}/efaq%.texi
192 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
194 ${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding
196 gnus_deps = ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi ${gfdl}
197 gnus.dvi: $(gnus_deps)
198 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmpdvi.texi
199 $(ENVADD) $(TEXI2DVI) gnustmpdvi.texi
200 cp gnustmpdvi.dvi $@
201 rm gnustmpdvi.*
203 gnus.pdf: $(gnus_deps)
204 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmppdf.texi
205 $(ENVADD) $(TEXI2PDF) gnustmppdf.texi
206 cp gnustmppdf.pdf $@
207 rm gnustmppdf.*
209 ${buildinfodir}/tramp.info tramp.html: EXTRA_OPTS = -D emacs
210 ${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
213 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
215 mostlyclean:
216 rm -f *.aux *.log *.toc *.c[mp] *.c[mp]s *.fn *.fns \
217 *.ky *.kys *.op *.ops *.p[gj] *.p[gj]s *.sc *.scs *.ss \
218 *.t[gp] *.t[gp]s *.vr *.vrs
219 rm -f gnustmp*
221 clean: mostlyclean
222 rm -f *.dvi *.html *.pdf *.ps
224 distclean: clean
225 rm -f Makefile
227 ## buildinfodir is relative to srcdir.
228 infoclean:
229 for file in $(INFO_TARGETS); do \
230 file=`echo $${file} | sed 's/\.info$$//'`.info; \
231 rm -f \
232 $(buildinfodir)/$${file} \
233 $(buildinfodir)/$${file}-[1-9] \
234 $(buildinfodir)/$${file}-[1-9][0-9]; \
235 done
237 bootstrap-clean maintainer-clean: distclean infoclean
239 .PHONY: install-dvi install-html install-pdf install-ps install-doc
241 install-dvi: dvi
242 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
243 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
244 install-html: html
245 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
246 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
247 install-pdf: pdf
248 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
249 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
250 install-ps: ps
251 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
252 for file in $(PS_TARGETS); do \
253 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
254 [ -n "${GZIP_PROG}" ] || continue; \
255 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
256 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
257 done
259 ## Top-level Makefile installs the info pages.
260 install-doc: install-dvi install-html install-pdf install-ps
264 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
266 uninstall-dvi:
267 for file in $(DVI_TARGETS); do \
268 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
269 done
270 uninstall-html:
271 for file in $(HTML_TARGETS); do \
272 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
273 done
274 uninstall-ps:
275 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
276 for file in $(PS_TARGETS); do \
277 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
278 done
279 uninstall-pdf:
280 for file in $(PDF_TARGETS); do \
281 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
282 done
284 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
287 ### Makefile ends here