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