Merge from emacs-24; up to 2012-12-29T12:57:49Z!fgallina@gnu.org
[bpt/emacs.git] / doc / lispref / Makefile.in
1 # Makefile for the GNU Emacs Lisp Reference Manual.
2
3 # Copyright (C) 1990-1996, 1998-2013 Free Software Foundation, Inc.
4
5 # This file is part of GNU Emacs.
6
7 # GNU Emacs is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
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
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20 SHELL = /bin/sh
21
22 # NB If you add any more configure variables,
23 # update the sed rules in the dist target below.
24
25 # Standard configure variables.
26 srcdir = @srcdir@
27
28 version=@version@
29
30 buildinfodir = $(srcdir)/../../info
31 # Directory with the (customized) texinfo.tex file.
32 texinfodir = $(srcdir)/../misc
33 # Directory with emacsver.texi.
34 emacsdir = $(srcdir)/../emacs
35
36 MKDIR_P = @MKDIR_P@
37
38 INFO_EXT=@INFO_EXT@
39 # Options used only when making info output.
40 INFO_OPTS=@INFO_OPTS@
41
42 MAKEINFO = @MAKEINFO@
43 MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir)
44 TEXI2DVI = texi2dvi
45 TEXI2PDF = texi2pdf
46 DVIPS = dvips
47
48 ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
49 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
50
51 # List of all the texinfo files in the manual:
52
53 srcs = \
54 $(srcdir)/elisp.texi \
55 $(emacsdir)/emacsver.texi \
56 $(srcdir)/abbrevs.texi \
57 $(srcdir)/advice.texi \
58 $(srcdir)/anti.texi \
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 \
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 \
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 \
90 $(srcdir)/package.texi \
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
107 mkinfodir = @${MKDIR_P} ${buildinfodir}
108
109 .PHONY: info dvi pdf ps
110
111 info: $(buildinfodir)/elisp$(INFO_EXT)
112 dvi: elisp.dvi
113 html: elisp.html
114 pdf: elisp.pdf
115 ps: elisp.ps
116
117 ## Note: "<" is not portable in ordinary make rules.
118 $(buildinfodir)/elisp$(INFO_EXT): $(srcs)
119 $(mkinfodir)
120 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi
121
122 elisp.dvi: $(srcs)
123 $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi
124
125 elisp.html: $(srcs)
126 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $(srcdir)/elisp.texi
127
128 elisp.ps: elisp.dvi
129 $(DVIPS) -o $@ elisp.dvi
130
131 elisp.pdf: $(srcs)
132 $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi
133
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
140 rm -f elisp[12]* vol[12].tmp
141
142 clean: mostlyclean
143 rm -f elisp.dvi elisp.pdf elisp.ps
144 rm -f vol[12].dvi vol[12].pdf vol[12].ps
145 rm -rf elisp.html
146 rm -f emacs-lispref-${version}.tar*
147
148 distclean: clean
149
150 infoclean:
151 -cd $(buildinfodir) && rm -f elisp$(INFO_EXT) elisp$(INFO_EXT)-[1-9] elisp$(INFO_EXT)-[1-9][0-9]
152
153 maintainer-clean: distclean infoclean
154
155 .PHONY: dist
156
157 ## Note this excludes the two-volume stuff.
158 dist:
159 rm -rf emacs-lispref-${version}
160 mkdir emacs-lispref-${version}
161 cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
162 $(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \
163 ${srcdir}/README emacs-lispref-${version}/
164 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
165 -e 's/^\(emacsdir *=\).*/\1 ./' \
166 -e 's/^\(buildinfodir *=\).*/\1 ./' \
167 -e 's/^\(clean:.*\)/\1 infoclean/' \
168 -e "s/@ver[s]ion@/${version}/" \
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@//' \
171 ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile
172 @if grep '@[a-zA-Z_]*@' emacs-lispref-${version}/Makefile; then \
173 echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
174 fi
175 tar -cf emacs-lispref-${version}.tar emacs-lispref-${version}
176 rm -rf emacs-lispref-${version}
177
178 ### Makefile ends here