]> code.delx.au - gnu-emacs/blob - doc/misc/Makefile.in
Update copyright year to 2015
[gnu-emacs] / doc / misc / Makefile.in
1 ### @configure_input@
2
3 # Copyright (C) 1994, 1996-2015 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 ## 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
31
32 ## Directory with emacsver.texi.
33 emacsdir = $(srcdir)/../emacs
34
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@
44
45 MKDIR_P = @MKDIR_P@
46
47 GZIP_PROG = @GZIP_PROG@
48
49 HTML_OPTS = --no-split --html
50
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
54
55 INSTALL = @INSTALL@
56 INSTALL_DATA = @INSTALL_DATA@
57
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)
63
64 ## On MS Windows, efaq-w32; otherwise blank.
65 DOCMISC_W32 = @DOCMISC_W32@
66
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
76
77 ## Info files to install on current platform.
78 INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32)
79
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
84
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)
89
90 DVI_TARGETS = $(TARGETS:=.dvi)
91 HTML_TARGETS = $(TARGETS:=.html)
92 PDF_TARGETS = $(TARGETS:=.pdf)
93 PS_TARGETS = $(TARGETS:=.ps)
94
95 TEXI2DVI = texi2dvi
96 TEXI2PDF = texi2pdf
97 DVIPS = dvips
98
99 # 'make' verbosity.
100 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
101
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 =
106
107 ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
108 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
109
110 gfdl = ${srcdir}/doclicense.texi
111
112 .PHONY: info dvi html pdf ps echo-info $(INFO_TARGETS)
113 ## Prevent implicit rule triggering for foo.info.
114 .SUFFIXES:
115
116 ## Disable implicit rules.
117 %.texi: ;
118
119 # Default.
120 info: $(INFO_TARGETS)
121
122 ## Used by top-level Makefile.
123 ## Base file names of output info files.
124 echo-info:
125 @echo "$(INFO_INSTALL) " | \
126 sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */.info /g"
127
128 dvi: $(DVI_TARGETS)
129
130 html: $(HTML_TARGETS)
131
132 pdf: $(PDF_TARGETS)
133
134 ps: $(PS_TARGETS)
135
136 ${buildinfodir}:
137 ${MKDIR_P} $@
138
139 ### The general case.
140
141 EXTRA_OPTS =
142
143 ${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} | ${buildinfodir}
144 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) \
145 -o $@ $<
146
147 ## The short aliases, eg efaq = $(buildinfodir)/efaq.info.
148 define info_template
149 $(1): $$(buildinfodir)/$(1).info
150 endef
151
152 ## "info" is already taken.
153 info.info: $(buildinfodir)/info.info
154
155 $(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile))))
156
157
158 %.dvi: ${srcdir}/%.texi ${gfdl}
159 $(ENVADD) $(TEXI2DVI) $<
160
161 %.pdf: ${srcdir}/%.texi ${gfdl}
162 $(ENVADD) $(TEXI2PDF) $<
163
164 %.html: ${srcdir}/%.texi ${gfdl}
165 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) \
166 -o $@ $<
167
168 %.ps: %.dvi
169 $(DVIPS) -o $@ $<
170
171
172 ### The exceptions.
173
174 ## Extra dependencies.
175
176 need_emacsver = calc cl dired-x efaq efaq-w32 erc ido reftex woman
177 need_emacsver_prefix = $(addprefix ${buildinfodir}/,${need_emacsver})
178
179 $(need_emacsver_prefix:=.info) $(need_emacsver:=.dvi) $(need_emacsver:=.pdf) $(need_emacsver:=.html) : ${emacsdir}/emacsver.texi
180
181 $(buildinfodir)/gnus.info gnus.html: ${srcdir}/gnus-faq.texi
182
183 $(buildinfodir)/semantic.info semantic.dvi semantic.pdf semantic.html: ${srcdir}/sem-user.texi
184
185
186 ## Please can we just rename cc-mode.texi to ccmode.texi...
187 ${buildinfodir}/ccmode.info: ${srcdir}/cc-mode.texi ${gfdl} | ${buildinfodir}
188 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
189
190 ## efaq, efaq_w32 do not depend on gfdl.
191 ## Maybe we can use .SECONDEXPANSION for this.
192 ${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi | ${buildinfodir}
193 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
194
195 efaq%.dvi: ${srcdir}/efaq%.texi
196 $(ENVADD) $(TEXI2DVI) $<
197
198 efaq%.pdf: ${srcdir}/efaq%.texi
199 $(ENVADD) $(TEXI2PDF) $<
200
201 efaq%.html: ${srcdir}/efaq%.texi
202 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
203
204 ${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding
205
206 gnus_deps = ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi ${gfdl}
207 gnus.dvi: $(gnus_deps)
208 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmpdvi.texi
209 $(ENVADD) $(TEXI2DVI) gnustmpdvi.texi
210 cp gnustmpdvi.dvi $@
211 rm gnustmpdvi.*
212
213 gnus.pdf: $(gnus_deps)
214 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmppdf.texi
215 $(ENVADD) $(TEXI2PDF) gnustmppdf.texi
216 cp gnustmppdf.pdf $@
217 rm gnustmppdf.*
218
219 ${buildinfodir}/tramp.info tramp.html: EXTRA_OPTS = -D emacs
220 ${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
221
222
223 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
224
225 mostlyclean:
226 rm -f *.aux *.log *.toc *.c[mp] *.c[mp]s *.fn *.fns \
227 *.ky *.kys *.op *.ops *.p[gj] *.p[gj]s *.sc *.scs *.ss \
228 *.t[gp] *.t[gp]s *.vr *.vrs
229 rm -f gnustmp*
230
231 clean: mostlyclean
232 rm -f *.dvi *.html *.pdf *.ps
233
234 distclean: clean
235 rm -f Makefile
236
237 ## buildinfodir is relative to srcdir.
238 infoclean:
239 for file in $(INFO_TARGETS); do \
240 file=`echo $${file} | sed 's/\.info$$//'`.info; \
241 rm -f \
242 $(buildinfodir)/$${file} \
243 $(buildinfodir)/$${file}-[1-9] \
244 $(buildinfodir)/$${file}-[1-9][0-9]; \
245 done
246
247 bootstrap-clean maintainer-clean: distclean infoclean
248
249 .PHONY: install-dvi install-html install-pdf install-ps install-doc
250
251 install-dvi: dvi
252 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
253 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
254 install-html: html
255 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
256 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
257 install-pdf: pdf
258 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
259 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
260 install-ps: ps
261 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
262 for file in $(PS_TARGETS); do \
263 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
264 [ -n "${GZIP_PROG}" ] || continue; \
265 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
266 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
267 done
268
269 ## Top-level Makefile installs the info pages.
270 install-doc: install-dvi install-html install-pdf install-ps
271
272
273
274 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
275
276 uninstall-dvi:
277 for file in $(DVI_TARGETS); do \
278 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
279 done
280 uninstall-html:
281 for file in $(HTML_TARGETS); do \
282 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
283 done
284 uninstall-ps:
285 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
286 for file in $(PS_TARGETS); do \
287 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
288 done
289 uninstall-pdf:
290 for file in $(PDF_TARGETS); do \
291 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
292 done
293
294 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
295
296
297 ### Makefile ends here