Commit | Line | Data |
---|---|---|
b8d4c8d0 GM |
1 | # Makefile for the GNU Emacs Lisp Reference Manual. |
2 | ||
29157371 | 3 | # Copyright (C) 1990-1996, 1998-2012 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 | ||
4c83f6e1 | 20 | SHELL = /bin/sh |
b8d4c8d0 GM |
21 | |
22 | # Standard configure variables. | |
23 | srcdir = @srcdir@ | |
24 | ||
17ca7950 GM |
25 | version=@version@ |
26 | ||
2fecccba | 27 | buildinfodir = $(srcdir)/../../info |
aa514a98 GM |
28 | # Directory with the (customized) texinfo.tex file. |
29 | texinfodir = $(srcdir)/../misc | |
f7a31f11 GM |
30 | # Directory with emacsver.texi. |
31 | emacsdir = $(srcdir)/../emacs | |
b8d4c8d0 | 32 | |
3fe7cdc8 GM |
33 | MKDIR_P = @MKDIR_P@ |
34 | ||
8045b906 GM |
35 | INFO_EXT=@INFO_EXT@ |
36 | # Options used only when making info output. | |
37 | INFO_OPTS=@INFO_OPTS@ | |
38 | ||
a8e1e9ee | 39 | MAKEINFO = @MAKEINFO@ |
6446548e | 40 | MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir) |
b8d4c8d0 | 41 | TEXI2DVI = texi2dvi |
64fbeb16 | 42 | TEXI2PDF = texi2pdf |
c12e4a81 | 43 | DVIPS = dvips |
b8d4c8d0 | 44 | |
450e3cae | 45 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \ |
a8e1e9ee WL |
46 | MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" |
47 | ||
b8d4c8d0 GM |
48 | # List of all the texinfo files in the manual: |
49 | ||
50 | srcs = \ | |
eef3ab94 | 51 | $(srcdir)/elisp.texi \ |
b13254e7 | 52 | $(emacsdir)/emacsver.texi \ |
b8d4c8d0 GM |
53 | $(srcdir)/abbrevs.texi \ |
54 | $(srcdir)/advice.texi \ | |
55 | $(srcdir)/anti.texi \ | |
b8d4c8d0 GM |
56 | $(srcdir)/backups.texi \ |
57 | $(srcdir)/buffers.texi \ | |
58 | $(srcdir)/commands.texi \ | |
59 | $(srcdir)/compile.texi \ | |
60 | $(srcdir)/control.texi \ | |
61 | $(srcdir)/customize.texi \ | |
62 | $(srcdir)/debugging.texi \ | |
63 | $(srcdir)/display.texi \ | |
64 | $(srcdir)/edebug.texi \ | |
b8d4c8d0 GM |
65 | $(srcdir)/errors.texi \ |
66 | $(srcdir)/eval.texi \ | |
67 | $(srcdir)/files.texi \ | |
68 | $(srcdir)/frames.texi \ | |
69 | $(srcdir)/functions.texi \ | |
70 | $(srcdir)/hash.texi \ | |
71 | $(srcdir)/help.texi \ | |
72 | $(srcdir)/hooks.texi \ | |
73 | $(srcdir)/internals.texi \ | |
74 | $(srcdir)/intro.texi \ | |
75 | $(srcdir)/keymaps.texi \ | |
76 | $(srcdir)/lists.texi \ | |
77 | $(srcdir)/loading.texi \ | |
b8d4c8d0 GM |
78 | $(srcdir)/macros.texi \ |
79 | $(srcdir)/maps.texi \ | |
80 | $(srcdir)/markers.texi \ | |
81 | $(srcdir)/minibuf.texi \ | |
82 | $(srcdir)/modes.texi \ | |
83 | $(srcdir)/nonascii.texi \ | |
84 | $(srcdir)/numbers.texi \ | |
85 | $(srcdir)/objects.texi \ | |
86 | $(srcdir)/os.texi \ | |
555e9b5c | 87 | $(srcdir)/package.texi \ |
b8d4c8d0 GM |
88 | $(srcdir)/positions.texi \ |
89 | $(srcdir)/processes.texi \ | |
90 | $(srcdir)/searching.texi \ | |
91 | $(srcdir)/sequences.texi \ | |
92 | $(srcdir)/streams.texi \ | |
93 | $(srcdir)/strings.texi \ | |
94 | $(srcdir)/symbols.texi \ | |
95 | $(srcdir)/syntax.texi \ | |
96 | $(srcdir)/text.texi \ | |
97 | $(srcdir)/tips.texi \ | |
98 | $(srcdir)/variables.texi \ | |
99 | $(srcdir)/windows.texi \ | |
100 | $(srcdir)/index.texi \ | |
101 | $(srcdir)/gpl.texi \ | |
102 | $(srcdir)/doclicense.texi | |
103 | ||
ac1a0ce1 | 104 | mkinfodir = @${MKDIR_P} ${buildinfodir} |
abd40fb4 | 105 | |
c12e4a81 | 106 | .PHONY: info dvi pdf ps |
ea274122 | 107 | |
ac1a0ce1 | 108 | info: $(buildinfodir)/elisp$(INFO_EXT) |
0264072d | 109 | dvi: elisp.dvi |
234db610 | 110 | html: elisp.html |
0264072d | 111 | pdf: elisp.pdf |
c12e4a81 | 112 | ps: elisp.ps |
0264072d | 113 | |
f48a9cb4 | 114 | ## Note: "<" is not portable in ordinary make rules. |
ac1a0ce1 | 115 | $(buildinfodir)/elisp$(INFO_EXT): $(srcs) |
abd40fb4 | 116 | $(mkinfodir) |
8045b906 | 117 | $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi |
b8d4c8d0 GM |
118 | |
119 | elisp.dvi: $(srcs) | |
f48a9cb4 | 120 | $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi |
b8d4c8d0 | 121 | |
234db610 | 122 | elisp.html: $(srcs) |
f48a9cb4 | 123 | $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $(srcdir)/elisp.texi |
234db610 | 124 | |
c12e4a81 | 125 | elisp.ps: elisp.dvi |
f48a9cb4 | 126 | $(DVIPS) -o $@ elisp.dvi |
c12e4a81 | 127 | |
64fbeb16 | 128 | elisp.pdf: $(srcs) |
f48a9cb4 | 129 | $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi |
64fbeb16 | 130 | |
4c83f6e1 GM |
131 | .PHONY: mostlyclean clean distclean maintainer-clean infoclean |
132 | ||
133 | ## [12] stuff is from two-volume.make. | |
134 | mostlyclean: | |
135 | rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ | |
136 | *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs | |
0a454caf | 137 | rm -f elisp[12]* vol[12].tmp |
0264072d | 138 | |
4c83f6e1 | 139 | clean: mostlyclean |
e6afe47b | 140 | rm -f elisp.dvi elisp.pdf elisp.ps |
0a454caf | 141 | rm -f vol[12].dvi vol[12].pdf vol[12].ps |
234db610 | 142 | rm -rf elisp.html |
17ca7950 | 143 | rm -f emacs-lispref-${version}.tar* |
b8d4c8d0 GM |
144 | |
145 | distclean: clean | |
146 | ||
4c83f6e1 | 147 | infoclean: |
ac1a0ce1 | 148 | -cd $(buildinfodir) && rm -f elisp$(INFO_EXT) elisp$(INFO_EXT)-[1-9] elisp$(INFO_EXT)-[1-9][0-9] |
0264072d | 149 | |
4c83f6e1 GM |
150 | maintainer-clean: distclean infoclean |
151 | ||
ea274122 GM |
152 | .PHONY: dist |
153 | ||
4c83f6e1 GM |
154 | ## Note this excludes the two-volume stuff. |
155 | dist: | |
17ca7950 GM |
156 | rm -rf emacs-lispref-${version} |
157 | mkdir emacs-lispref-${version} | |
4c83f6e1 | 158 | cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \ |
208deadc GM |
159 | $(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \ |
160 | ${srcdir}/README emacs-lispref-${version}/ | |
4393405b GM |
161 | sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \ |
162 | -e 's/^\(emacsdir *=\).*/\1 ./' \ | |
2fecccba GM |
163 | -e 's/^\(buildinfodir *=\).*/\1 ./' \ |
164 | -e 's/^\(clean:.*\)/\1 infoclean/' \ | |
17ca7950 GM |
165 | -e "s/@ver[s]ion@/${version}/" \ |
166 | ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile | |
167 | tar -cf emacs-lispref-${version}.tar emacs-lispref-${version} | |
168 | rm -rf emacs-lispref-${version} | |
4c83f6e1 | 169 | |
0264072d | 170 | ### Makefile ends here |