Refix movemail GCC pacification
[emacs.git] / doc / misc / Makefile.in
blobaa35002e85e64420ab5fbbf4c5d6a5aedff11c86
1 ### @configure_input@
3 # Copyright (C) 1994, 1996-2015 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 docstyle.texi and 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 # 'make' verbosity.
100 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
102 AM_V_GEN = $(am__v_GEN_@AM_V@)
103 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
104 am__v_GEN_0 = @echo " GEN " $@;
105 am__v_GEN_1 =
107 ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
108 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
110 gfdl = ${srcdir}/doclicense.texi
111 style = ${emacsdir}/docstyle.texi
113 .PHONY: info dvi html pdf ps echo-info $(INFO_TARGETS)
114 ## Prevent implicit rule triggering for foo.info.
115 .SUFFIXES:
117 ## Disable implicit rules.
118 %.texi: ;
120 # Default.
121 info: $(INFO_TARGETS)
123 ## Used by top-level Makefile.
124 ## Base file names of output info files.
125 echo-info:
126 @echo "$(INFO_INSTALL) " | \
127 sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */.info /g"
129 dvi: $(DVI_TARGETS)
131 html: $(HTML_TARGETS)
133 pdf: $(PDF_TARGETS)
135 ps: $(PS_TARGETS)
137 ${buildinfodir}:
138 ${MKDIR_P} $@
140 ### The general case.
142 EXTRA_OPTS =
144 ${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} ${style} | ${buildinfodir}
145 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) \
146 -o $@ $<
148 ## The short aliases, eg efaq = $(buildinfodir)/efaq.info.
149 define info_template
150 $(1): $$(buildinfodir)/$(1).info
151 endef
153 ## "info" is already taken.
154 info.info: $(buildinfodir)/info.info
156 $(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile))))
159 %.dvi: ${srcdir}/%.texi ${gfdl} ${style}
160 $(ENVADD) $(TEXI2DVI) $<
162 %.pdf: ${srcdir}/%.texi ${gfdl} ${style}
163 $(ENVADD) $(TEXI2PDF) $<
165 %.html: ${srcdir}/%.texi ${gfdl} ${style}
166 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) \
167 -o $@ $<
169 %.ps: %.dvi
170 $(DVIPS) -o $@ $<
173 ### The exceptions.
175 ## Extra dependencies.
177 need_emacsver = calc cl dired-x efaq efaq-w32 erc ido reftex woman
178 need_emacsver_prefix = $(addprefix ${buildinfodir}/,${need_emacsver})
180 $(need_emacsver_prefix:=.info) $(need_emacsver:=.dvi) $(need_emacsver:=.pdf) $(need_emacsver:=.html) : ${emacsdir}/emacsver.texi
182 $(buildinfodir)/gnus.info gnus.html: ${srcdir}/gnus-faq.texi
184 $(buildinfodir)/semantic.info semantic.dvi semantic.pdf semantic.html: ${srcdir}/sem-user.texi
187 ## Please can we just rename cc-mode.texi to ccmode.texi...
188 ${buildinfodir}/ccmode.info: \
189 ${srcdir}/cc-mode.texi ${gfdl} ${style} | ${buildinfodir}
190 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
192 ## efaq, efaq_w32 do not depend on gfdl.
193 ## Maybe we can use .SECONDEXPANSION for this.
194 ${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi ${style} | ${buildinfodir}
195 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
197 efaq%.dvi: ${srcdir}/efaq%.texi
198 $(ENVADD) $(TEXI2DVI) $<
200 efaq%.pdf: ${srcdir}/efaq%.texi
201 $(ENVADD) $(TEXI2PDF) $<
203 efaq%.html: ${srcdir}/efaq%.texi
204 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
206 ${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding
208 gnus_deps = ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi ${gfdl} ${style}
209 gnus.dvi: $(gnus_deps)
210 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmpdvi.texi
211 $(ENVADD) $(TEXI2DVI) gnustmpdvi.texi
212 cp gnustmpdvi.dvi $@
213 rm gnustmpdvi.*
215 gnus.pdf: $(gnus_deps)
216 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmppdf.texi
217 $(ENVADD) $(TEXI2PDF) gnustmppdf.texi
218 cp gnustmppdf.pdf $@
219 rm gnustmppdf.*
221 ${buildinfodir}/tramp.info tramp.html: EXTRA_OPTS = -D emacs
222 ${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
225 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
227 mostlyclean:
228 rm -f *.aux *.log *.toc *.c[mp] *.c[mp]s *.fn *.fns \
229 *.ky *.kys *.op *.ops *.p[gj] *.p[gj]s *.sc *.scs *.ss \
230 *.t[gp] *.t[gp]s *.vr *.vrs
231 rm -f gnustmp*
233 clean: mostlyclean
234 rm -f *.dvi *.html *.pdf *.ps
236 distclean: clean
237 rm -f Makefile
239 ## buildinfodir is relative to srcdir.
240 infoclean:
241 for file in $(INFO_TARGETS); do \
242 file=`echo $${file} | sed 's/\.info$$//'`.info; \
243 rm -f \
244 $(buildinfodir)/$${file} \
245 $(buildinfodir)/$${file}-[1-9] \
246 $(buildinfodir)/$${file}-[1-9][0-9]; \
247 done
249 bootstrap-clean maintainer-clean: distclean infoclean
251 .PHONY: install-dvi install-html install-pdf install-ps install-doc
253 install-dvi: dvi
254 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
255 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
256 install-html: html
257 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
258 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
259 install-pdf: pdf
260 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
261 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
262 install-ps: ps
263 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
264 for file in $(PS_TARGETS); do \
265 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
266 [ -n "${GZIP_PROG}" ] || continue; \
267 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
268 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
269 done
271 ## Top-level Makefile installs the info pages.
272 install-doc: install-dvi install-html install-pdf install-ps
276 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
278 uninstall-dvi:
279 for file in $(DVI_TARGETS); do \
280 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
281 done
282 uninstall-html:
283 for file in $(HTML_TARGETS); do \
284 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
285 done
286 uninstall-ps:
287 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
288 for file in $(PS_TARGETS); do \
289 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
290 done
291 uninstall-pdf:
292 for file in $(PDF_TARGETS); do \
293 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
294 done
296 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
299 ### Makefile ends here