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 | 52 | # Options used only when making info output. |
40abffe4 | 53 | INFO_OPTS= --no-split |
8045b906 | 54 | |
8496d8d7 GM |
55 | INSTALL = @INSTALL@ |
56 | INSTALL_DATA = @INSTALL_DATA@ | |
57 | ||
a8e1e9ee | 58 | MAKEINFO = @MAKEINFO@ |
6446548e | 59 | MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir) |
b8d4c8d0 | 60 | TEXI2DVI = texi2dvi |
64fbeb16 | 61 | TEXI2PDF = texi2pdf |
c12e4a81 | 62 | DVIPS = dvips |
b8d4c8d0 | 63 | |
450e3cae | 64 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \ |
a8e1e9ee WL |
65 | MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" |
66 | ||
8496d8d7 GM |
67 | DVI_TARGETS = elisp.dvi |
68 | HTML_TARGETS = elisp.html | |
69 | PDF_TARGETS = elisp.pdf | |
70 | PS_TARGETS = elisp.ps | |
71 | ||
b8d4c8d0 GM |
72 | # List of all the texinfo files in the manual: |
73 | ||
74 | srcs = \ | |
eef3ab94 | 75 | $(srcdir)/elisp.texi \ |
b13254e7 | 76 | $(emacsdir)/emacsver.texi \ |
b8d4c8d0 | 77 | $(srcdir)/abbrevs.texi \ |
b8d4c8d0 | 78 | $(srcdir)/anti.texi \ |
b8d4c8d0 GM |
79 | $(srcdir)/backups.texi \ |
80 | $(srcdir)/buffers.texi \ | |
81 | $(srcdir)/commands.texi \ | |
82 | $(srcdir)/compile.texi \ | |
83 | $(srcdir)/control.texi \ | |
84 | $(srcdir)/customize.texi \ | |
85 | $(srcdir)/debugging.texi \ | |
86 | $(srcdir)/display.texi \ | |
87 | $(srcdir)/edebug.texi \ | |
b8d4c8d0 GM |
88 | $(srcdir)/errors.texi \ |
89 | $(srcdir)/eval.texi \ | |
90 | $(srcdir)/files.texi \ | |
91 | $(srcdir)/frames.texi \ | |
92 | $(srcdir)/functions.texi \ | |
93 | $(srcdir)/hash.texi \ | |
94 | $(srcdir)/help.texi \ | |
95 | $(srcdir)/hooks.texi \ | |
96 | $(srcdir)/internals.texi \ | |
97 | $(srcdir)/intro.texi \ | |
98 | $(srcdir)/keymaps.texi \ | |
99 | $(srcdir)/lists.texi \ | |
100 | $(srcdir)/loading.texi \ | |
b8d4c8d0 GM |
101 | $(srcdir)/macros.texi \ |
102 | $(srcdir)/maps.texi \ | |
103 | $(srcdir)/markers.texi \ | |
104 | $(srcdir)/minibuf.texi \ | |
105 | $(srcdir)/modes.texi \ | |
106 | $(srcdir)/nonascii.texi \ | |
107 | $(srcdir)/numbers.texi \ | |
108 | $(srcdir)/objects.texi \ | |
109 | $(srcdir)/os.texi \ | |
555e9b5c | 110 | $(srcdir)/package.texi \ |
b8d4c8d0 GM |
111 | $(srcdir)/positions.texi \ |
112 | $(srcdir)/processes.texi \ | |
113 | $(srcdir)/searching.texi \ | |
114 | $(srcdir)/sequences.texi \ | |
115 | $(srcdir)/streams.texi \ | |
116 | $(srcdir)/strings.texi \ | |
117 | $(srcdir)/symbols.texi \ | |
118 | $(srcdir)/syntax.texi \ | |
119 | $(srcdir)/text.texi \ | |
120 | $(srcdir)/tips.texi \ | |
121 | $(srcdir)/variables.texi \ | |
122 | $(srcdir)/windows.texi \ | |
123 | $(srcdir)/index.texi \ | |
124 | $(srcdir)/gpl.texi \ | |
125 | $(srcdir)/doclicense.texi | |
126 | ||
b8e83630 GM |
127 | ## Disable implicit rules. |
128 | %.texi: ; | |
129 | ||
814200c2 | 130 | .PHONY: info dvi html pdf ps |
8496d8d7 | 131 | |
40abffe4 | 132 | info: $(buildinfodir)/elisp.info |
8496d8d7 GM |
133 | dvi: $(DVI_TARGETS) |
134 | html: $(HTML_TARGETS) | |
135 | pdf: $(PDF_TARGETS) | |
136 | ps: $(PS_TARGETS) | |
0264072d | 137 | |
814200c2 GM |
138 | ${buildinfodir}: |
139 | ${MKDIR_P} $@ | |
140 | ||
141 | $(buildinfodir)/elisp.info: $(srcs) | ${buildinfodir} | |
142 | $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $< | |
b8d4c8d0 GM |
143 | |
144 | elisp.dvi: $(srcs) | |
814200c2 | 145 | $(ENVADD) $(TEXI2DVI) $< |
b8d4c8d0 | 146 | |
234db610 | 147 | elisp.html: $(srcs) |
814200c2 | 148 | $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $< |
c12e4a81 | 149 | |
64fbeb16 | 150 | elisp.pdf: $(srcs) |
814200c2 GM |
151 | $(ENVADD) $(TEXI2PDF) $< |
152 | ||
153 | elisp.ps: elisp.dvi | |
154 | $(DVIPS) -o $@ $< | |
64fbeb16 | 155 | |
0e6929ec | 156 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean |
4c83f6e1 GM |
157 | |
158 | ## [12] stuff is from two-volume.make. | |
159 | mostlyclean: | |
160 | rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ | |
161 | *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs | |
0a454caf | 162 | rm -f elisp[12]* vol[12].tmp |
0264072d | 163 | |
4c83f6e1 | 164 | clean: mostlyclean |
8496d8d7 | 165 | rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS) |
0a454caf | 166 | rm -f vol[12].dvi vol[12].pdf vol[12].ps |
17ca7950 | 167 | rm -f emacs-lispref-${version}.tar* |
b8d4c8d0 GM |
168 | |
169 | distclean: clean | |
26e4aa7d | 170 | rm -f Makefile |
b8d4c8d0 | 171 | |
4c83f6e1 | 172 | infoclean: |
eb36672f | 173 | rm -f \ |
40abffe4 GM |
174 | $(buildinfodir)/elisp.info \ |
175 | $(buildinfodir)/elisp.info-[1-9] \ | |
176 | $(buildinfodir)/elisp.info-[1-9][0-9] | |
0264072d | 177 | |
0e6929ec | 178 | bootstrap-clean maintainer-clean: distclean infoclean |
4c83f6e1 | 179 | |
ea274122 GM |
180 | .PHONY: dist |
181 | ||
4c83f6e1 GM |
182 | ## Note this excludes the two-volume stuff. |
183 | dist: | |
17ca7950 GM |
184 | rm -rf emacs-lispref-${version} |
185 | mkdir emacs-lispref-${version} | |
4c83f6e1 | 186 | cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \ |
208deadc GM |
187 | $(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \ |
188 | ${srcdir}/README emacs-lispref-${version}/ | |
4393405b GM |
189 | sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \ |
190 | -e 's/^\(emacsdir *=\).*/\1 ./' \ | |
2fecccba GM |
191 | -e 's/^\(buildinfodir *=\).*/\1 ./' \ |
192 | -e 's/^\(clean:.*\)/\1 infoclean/' \ | |
17ca7950 | 193 | -e "s/@ver[s]ion@/${version}/" \ |
789cf833 | 194 | -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \ |
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 |