Commit | Line | Data |
---|---|---|
bbece175 | 1 | ### @configure_input@ |
b8d4c8d0 | 2 | |
ba318903 | 3 | # Copyright (C) 1990-1996, 1998-2014 Free Software Foundation, Inc. |
b8d4c8d0 GM |
4 | |
5 | # This file is part of GNU Emacs. | |
6 | ||
352c8b4a | 7 | # GNU Emacs is free software: you can redistribute it and/or modify |
b8d4c8d0 | 8 | # it under the terms of the GNU General Public License as published by |
352c8b4a GM |
9 | # the Free Software Foundation, either version 3 of the License, or |
10 | # (at your option) any later version. | |
b8d4c8d0 GM |
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 | |
352c8b4a GM |
18 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
19 | ||
50b13cde | 20 | SHELL = @SHELL@ |
b8d4c8d0 | 21 | |
789cf833 GM |
22 | # NB If you add any more configure variables, |
23 | # update the sed rules in the dist target below. | |
24 | ||
b8d4c8d0 GM |
25 | # Standard configure variables. |
26 | srcdir = @srcdir@ | |
27 | ||
17ca7950 GM |
28 | version=@version@ |
29 | ||
2fecccba | 30 | buildinfodir = $(srcdir)/../../info |
aa514a98 GM |
31 | # Directory with the (customized) texinfo.tex file. |
32 | texinfodir = $(srcdir)/../misc | |
f7a31f11 GM |
33 | # Directory with emacsver.texi. |
34 | emacsdir = $(srcdir)/../emacs | |
b8d4c8d0 | 35 | |
8496d8d7 GM |
36 | prefix = @prefix@ |
37 | datarootdir = @datarootdir@ | |
38 | datadir = @datadir@ | |
39 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | |
40 | docdir = @docdir@ | |
41 | dvidir = @dvidir@ | |
42 | htmldir = @htmldir@ | |
43 | pdfdir = @pdfdir@ | |
44 | psdir = @psdir@ | |
45 | ||
3fe7cdc8 GM |
46 | MKDIR_P = @MKDIR_P@ |
47 | ||
8496d8d7 GM |
48 | GZIP_PROG = @GZIP_PROG@ |
49 | ||
50 | HTML_OPTS = --no-split --html | |
51 | ||
8045b906 GM |
52 | INFO_EXT=@INFO_EXT@ |
53 | # Options used only when making info output. | |
54 | INFO_OPTS=@INFO_OPTS@ | |
55 | ||
8496d8d7 GM |
56 | INSTALL = @INSTALL@ |
57 | INSTALL_DATA = @INSTALL_DATA@ | |
58 | ||
a8e1e9ee | 59 | MAKEINFO = @MAKEINFO@ |
6446548e | 60 | MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir) |
b8d4c8d0 | 61 | TEXI2DVI = texi2dvi |
64fbeb16 | 62 | TEXI2PDF = texi2pdf |
c12e4a81 | 63 | DVIPS = dvips |
b8d4c8d0 | 64 | |
450e3cae | 65 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \ |
a8e1e9ee WL |
66 | MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" |
67 | ||
8496d8d7 GM |
68 | DVI_TARGETS = elisp.dvi |
69 | HTML_TARGETS = elisp.html | |
70 | PDF_TARGETS = elisp.pdf | |
71 | PS_TARGETS = elisp.ps | |
72 | ||
b8d4c8d0 GM |
73 | # List of all the texinfo files in the manual: |
74 | ||
75 | srcs = \ | |
eef3ab94 | 76 | $(srcdir)/elisp.texi \ |
b13254e7 | 77 | $(emacsdir)/emacsver.texi \ |
b8d4c8d0 GM |
78 | $(srcdir)/abbrevs.texi \ |
79 | $(srcdir)/advice.texi \ | |
80 | $(srcdir)/anti.texi \ | |
b8d4c8d0 GM |
81 | $(srcdir)/backups.texi \ |
82 | $(srcdir)/buffers.texi \ | |
83 | $(srcdir)/commands.texi \ | |
84 | $(srcdir)/compile.texi \ | |
85 | $(srcdir)/control.texi \ | |
86 | $(srcdir)/customize.texi \ | |
87 | $(srcdir)/debugging.texi \ | |
88 | $(srcdir)/display.texi \ | |
89 | $(srcdir)/edebug.texi \ | |
b8d4c8d0 GM |
90 | $(srcdir)/errors.texi \ |
91 | $(srcdir)/eval.texi \ | |
92 | $(srcdir)/files.texi \ | |
93 | $(srcdir)/frames.texi \ | |
94 | $(srcdir)/functions.texi \ | |
95 | $(srcdir)/hash.texi \ | |
96 | $(srcdir)/help.texi \ | |
97 | $(srcdir)/hooks.texi \ | |
98 | $(srcdir)/internals.texi \ | |
99 | $(srcdir)/intro.texi \ | |
100 | $(srcdir)/keymaps.texi \ | |
101 | $(srcdir)/lists.texi \ | |
102 | $(srcdir)/loading.texi \ | |
b8d4c8d0 GM |
103 | $(srcdir)/macros.texi \ |
104 | $(srcdir)/maps.texi \ | |
105 | $(srcdir)/markers.texi \ | |
106 | $(srcdir)/minibuf.texi \ | |
107 | $(srcdir)/modes.texi \ | |
108 | $(srcdir)/nonascii.texi \ | |
109 | $(srcdir)/numbers.texi \ | |
110 | $(srcdir)/objects.texi \ | |
111 | $(srcdir)/os.texi \ | |
555e9b5c | 112 | $(srcdir)/package.texi \ |
b8d4c8d0 GM |
113 | $(srcdir)/positions.texi \ |
114 | $(srcdir)/processes.texi \ | |
115 | $(srcdir)/searching.texi \ | |
116 | $(srcdir)/sequences.texi \ | |
117 | $(srcdir)/streams.texi \ | |
118 | $(srcdir)/strings.texi \ | |
119 | $(srcdir)/symbols.texi \ | |
120 | $(srcdir)/syntax.texi \ | |
121 | $(srcdir)/text.texi \ | |
122 | $(srcdir)/tips.texi \ | |
123 | $(srcdir)/variables.texi \ | |
124 | $(srcdir)/windows.texi \ | |
125 | $(srcdir)/index.texi \ | |
126 | $(srcdir)/gpl.texi \ | |
127 | $(srcdir)/doclicense.texi | |
128 | ||
ac1a0ce1 | 129 | mkinfodir = @${MKDIR_P} ${buildinfodir} |
abd40fb4 | 130 | |
c12e4a81 | 131 | .PHONY: info dvi pdf ps |
ea274122 | 132 | |
8496d8d7 GM |
133 | .SUFFIXES: .ps .dvi |
134 | ||
135 | .dvi.ps: | |
136 | $(DVIPS) -o $@ $< | |
137 | ||
ac1a0ce1 | 138 | info: $(buildinfodir)/elisp$(INFO_EXT) |
8496d8d7 GM |
139 | dvi: $(DVI_TARGETS) |
140 | html: $(HTML_TARGETS) | |
141 | pdf: $(PDF_TARGETS) | |
142 | ps: $(PS_TARGETS) | |
0264072d | 143 | |
f48a9cb4 | 144 | ## Note: "<" is not portable in ordinary make rules. |
ac1a0ce1 | 145 | $(buildinfodir)/elisp$(INFO_EXT): $(srcs) |
abd40fb4 | 146 | $(mkinfodir) |
8045b906 | 147 | $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi |
b8d4c8d0 GM |
148 | |
149 | elisp.dvi: $(srcs) | |
f48a9cb4 | 150 | $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi |
b8d4c8d0 | 151 | |
234db610 | 152 | elisp.html: $(srcs) |
8496d8d7 | 153 | $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $(srcdir)/elisp.texi |
c12e4a81 | 154 | |
64fbeb16 | 155 | elisp.pdf: $(srcs) |
f48a9cb4 | 156 | $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi |
64fbeb16 | 157 | |
4c83f6e1 GM |
158 | .PHONY: mostlyclean clean distclean maintainer-clean infoclean |
159 | ||
160 | ## [12] stuff is from two-volume.make. | |
161 | mostlyclean: | |
162 | rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ | |
163 | *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs | |
0a454caf | 164 | rm -f elisp[12]* vol[12].tmp |
0264072d | 165 | |
4c83f6e1 | 166 | clean: mostlyclean |
8496d8d7 | 167 | rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS) |
0a454caf | 168 | rm -f vol[12].dvi vol[12].pdf vol[12].ps |
17ca7950 | 169 | rm -f emacs-lispref-${version}.tar* |
b8d4c8d0 GM |
170 | |
171 | distclean: clean | |
26e4aa7d | 172 | rm -f Makefile |
b8d4c8d0 | 173 | |
4c83f6e1 | 174 | infoclean: |
ac1a0ce1 | 175 | -cd $(buildinfodir) && rm -f elisp$(INFO_EXT) elisp$(INFO_EXT)-[1-9] elisp$(INFO_EXT)-[1-9][0-9] |
0264072d | 176 | |
4c83f6e1 GM |
177 | maintainer-clean: distclean infoclean |
178 | ||
ea274122 GM |
179 | .PHONY: dist |
180 | ||
4c83f6e1 GM |
181 | ## Note this excludes the two-volume stuff. |
182 | dist: | |
17ca7950 GM |
183 | rm -rf emacs-lispref-${version} |
184 | mkdir emacs-lispref-${version} | |
4c83f6e1 | 185 | cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \ |
208deadc GM |
186 | $(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \ |
187 | ${srcdir}/README emacs-lispref-${version}/ | |
4393405b GM |
188 | sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \ |
189 | -e 's/^\(emacsdir *=\).*/\1 ./' \ | |
2fecccba GM |
190 | -e 's/^\(buildinfodir *=\).*/\1 ./' \ |
191 | -e 's/^\(clean:.*\)/\1 infoclean/' \ | |
17ca7950 | 192 | -e "s/@ver[s]ion@/${version}/" \ |
789cf833 GM |
193 | -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \ |
194 | -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \ | |
17ca7950 | 195 | ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile |
fc4893eb GM |
196 | @if grep '@[a-zA-Z_]*@' emacs-lispref-${version}/Makefile; then \ |
197 | echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \ | |
198 | fi | |
17ca7950 GM |
199 | tar -cf emacs-lispref-${version}.tar emacs-lispref-${version} |
200 | rm -rf emacs-lispref-${version} | |
4c83f6e1 | 201 | |
8496d8d7 GM |
202 | .PHONY: install-dvi install-html install-pdf install-ps install-doc |
203 | ||
204 | install-dvi: dvi | |
48f73cfb GM |
205 | umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)" |
206 | $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)" | |
8496d8d7 | 207 | install-html: html |
48f73cfb GM |
208 | umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)" |
209 | $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)" | |
8496d8d7 | 210 | install-pdf: pdf |
48f73cfb GM |
211 | umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)" |
212 | $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)" | |
8496d8d7 | 213 | install-ps: ps |
48f73cfb | 214 | umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)" |
8496d8d7 | 215 | for file in $(PS_TARGETS); do \ |
48f73cfb | 216 | $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \ |
8496d8d7 | 217 | [ -n "${GZIP_PROG}" ] || continue; \ |
48f73cfb GM |
218 | rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \ |
219 | ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \ | |
8496d8d7 GM |
220 | done |
221 | ||
222 | ## Top-level Makefile installs the info pages. | |
223 | install-doc: install-dvi install-html install-pdf install-ps | |
224 | ||
225 | ||
226 | .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc | |
227 | ||
228 | uninstall-dvi: | |
229 | for file in $(DVI_TARGETS); do \ | |
48f73cfb | 230 | rm -f "$(DESTDIR)$(dvidir)/$${file}"; \ |
8496d8d7 GM |
231 | done |
232 | uninstall-html: | |
233 | for file in $(HTML_TARGETS); do \ | |
48f73cfb | 234 | rm -f "$(DESTDIR)$(htmldir)/$${file}"; \ |
8496d8d7 GM |
235 | done |
236 | uninstall-ps: | |
237 | ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \ | |
238 | for file in $(PS_TARGETS); do \ | |
48f73cfb | 239 | rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \ |
8496d8d7 GM |
240 | done |
241 | uninstall-pdf: | |
242 | for file in $(PDF_TARGETS); do \ | |
48f73cfb | 243 | rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \ |
8496d8d7 GM |
244 | done |
245 | ||
246 | uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps | |
247 | ||
248 | ||
0264072d | 249 | ### Makefile ends here |