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