Auto-commit of loaddefs files.
[emacs.git] / doc / lispref / Makefile.in
blob164646ac4332f96632e838c3b67e88c97a8c43b2
1 ### @configure_input@
3 # Copyright (C) 1990-1996, 1998-2013 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
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.
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.
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/>.
20 SHELL = @SHELL@
22 # NB If you add any more configure variables,
23 # update the sed rules in the dist target below.
25 # Standard configure variables.
26 srcdir = @srcdir@
28 version=@version@
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
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@
46 MKDIR_P = @MKDIR_P@
48 GZIP_PROG = @GZIP_PROG@
50 HTML_OPTS = --no-split --html
52 INFO_EXT=@INFO_EXT@
53 # Options used only when making info output.
54 INFO_OPTS=@INFO_OPTS@
56 INSTALL = @INSTALL@
57 INSTALL_DATA = @INSTALL_DATA@
59 MAKEINFO = @MAKEINFO@
60 MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir)
61 TEXI2DVI = texi2dvi
62 TEXI2PDF = texi2pdf
63 DVIPS = dvips
65 ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
66 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
68 DVI_TARGETS = elisp.dvi
69 HTML_TARGETS = elisp.html
70 PDF_TARGETS = elisp.pdf
71 PS_TARGETS = elisp.ps
73 # List of all the texinfo files in the manual:
75 srcs = \
76 $(srcdir)/elisp.texi \
77 $(emacsdir)/emacsver.texi \
78 $(srcdir)/abbrevs.texi \
79 $(srcdir)/advice.texi \
80 $(srcdir)/anti.texi \
81 $(srcdir)/backups.texi \
82 $(srcdir)/buffers.texi \
83 $(srcdir)/commands.texi \
84 $(srcdir)/compile.texi \
85 $(srcdir)/control.texi \
86 $(srcdir)/customize.texi \
87 $(srcdir)/debugging.texi \
88 $(srcdir)/display.texi \
89 $(srcdir)/edebug.texi \
90 $(srcdir)/errors.texi \
91 $(srcdir)/eval.texi \
92 $(srcdir)/files.texi \
93 $(srcdir)/frames.texi \
94 $(srcdir)/functions.texi \
95 $(srcdir)/hash.texi \
96 $(srcdir)/help.texi \
97 $(srcdir)/hooks.texi \
98 $(srcdir)/internals.texi \
99 $(srcdir)/intro.texi \
100 $(srcdir)/keymaps.texi \
101 $(srcdir)/lists.texi \
102 $(srcdir)/loading.texi \
103 $(srcdir)/macros.texi \
104 $(srcdir)/maps.texi \
105 $(srcdir)/markers.texi \
106 $(srcdir)/minibuf.texi \
107 $(srcdir)/modes.texi \
108 $(srcdir)/nonascii.texi \
109 $(srcdir)/numbers.texi \
110 $(srcdir)/objects.texi \
111 $(srcdir)/os.texi \
112 $(srcdir)/package.texi \
113 $(srcdir)/positions.texi \
114 $(srcdir)/processes.texi \
115 $(srcdir)/searching.texi \
116 $(srcdir)/sequences.texi \
117 $(srcdir)/streams.texi \
118 $(srcdir)/strings.texi \
119 $(srcdir)/symbols.texi \
120 $(srcdir)/syntax.texi \
121 $(srcdir)/text.texi \
122 $(srcdir)/tips.texi \
123 $(srcdir)/variables.texi \
124 $(srcdir)/windows.texi \
125 $(srcdir)/index.texi \
126 $(srcdir)/gpl.texi \
127 $(srcdir)/doclicense.texi
129 mkinfodir = @${MKDIR_P} ${buildinfodir}
131 .PHONY: info dvi pdf ps
133 .SUFFIXES: .ps .dvi
135 .dvi.ps:
136 $(DVIPS) -o $@ $<
138 info: $(buildinfodir)/elisp$(INFO_EXT)
139 dvi: $(DVI_TARGETS)
140 html: $(HTML_TARGETS)
141 pdf: $(PDF_TARGETS)
142 ps: $(PS_TARGETS)
144 ## Note: "<" is not portable in ordinary make rules.
145 $(buildinfodir)/elisp$(INFO_EXT): $(srcs)
146 $(mkinfodir)
147 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi
149 elisp.dvi: $(srcs)
150 $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi
152 elisp.html: $(srcs)
153 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $(srcdir)/elisp.texi
155 elisp.pdf: $(srcs)
156 $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi
158 .PHONY: mostlyclean clean distclean maintainer-clean infoclean
160 ## [12] stuff is from two-volume.make.
161 mostlyclean:
162 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
163 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
164 rm -f elisp[12]* vol[12].tmp
166 clean: mostlyclean
167 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
168 rm -f vol[12].dvi vol[12].pdf vol[12].ps
169 rm -f emacs-lispref-${version}.tar*
171 distclean: clean
173 infoclean:
174 -cd $(buildinfodir) && rm -f elisp$(INFO_EXT) elisp$(INFO_EXT)-[1-9] elisp$(INFO_EXT)-[1-9][0-9]
176 maintainer-clean: distclean infoclean
178 .PHONY: dist
180 ## Note this excludes the two-volume stuff.
181 dist:
182 rm -rf emacs-lispref-${version}
183 mkdir emacs-lispref-${version}
184 cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
185 $(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \
186 ${srcdir}/README emacs-lispref-${version}/
187 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
188 -e 's/^\(emacsdir *=\).*/\1 ./' \
189 -e 's/^\(buildinfodir *=\).*/\1 ./' \
190 -e 's/^\(clean:.*\)/\1 infoclean/' \
191 -e "s/@ver[s]ion@/${version}/" \
192 -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
193 -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
194 ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile
195 @if grep '@[a-zA-Z_]*@' emacs-lispref-${version}/Makefile; then \
196 echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
198 tar -cf emacs-lispref-${version}.tar emacs-lispref-${version}
199 rm -rf emacs-lispref-${version}
201 .PHONY: install-dvi install-html install-pdf install-ps install-doc
203 install-dvi: dvi
204 umask 022; $(MKDIR_P) $(DESTDIR)$(dvidir)
205 $(INSTALL_DATA) $(DVI_TARGETS) $(DESTDIR)$(dvidir)
206 install-html: html
207 umask 022; $(MKDIR_P) $(DESTDIR)$(htmldir)
208 $(INSTALL_DATA) $(HTML_TARGETS) $(DESTDIR)$(htmldir)
209 install-pdf: pdf
210 umask 022;$(MKDIR_P) $(DESTDIR)$(pdfdir)
211 $(INSTALL_DATA) $(PDF_TARGETS) $(DESTDIR)$(pdfdir)
212 install-ps: ps
213 umask 022; $(MKDIR_P) $(DESTDIR)$(psdir)
214 for file in $(PS_TARGETS); do \
215 $(INSTALL_DATA) $${file} $(DESTDIR)$(psdir); \
216 [ -n "${GZIP_PROG}" ] || continue; \
217 rm -f $(DESTDIR)$(psdir)/$${file}.gz; \
218 ${GZIP_PROG} -9n $(DESTDIR)$(psdir)/$${file}; \
219 done
221 ## Top-level Makefile installs the info pages.
222 install-doc: install-dvi install-html install-pdf install-ps
225 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
227 uninstall-dvi:
228 for file in $(DVI_TARGETS); do \
229 rm -f $(DESTDIR)$(dvidir)/$${file}; \
230 done
231 uninstall-html:
232 for file in $(HTML_TARGETS); do \
233 rm -f $(DESTDIR)$(htmldir)/$${file}; \
234 done
235 uninstall-ps:
236 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
237 for file in $(PS_TARGETS); do \
238 rm -f $(DESTDIR)$(psdir)/$${file}$${ext}; \
239 done
240 uninstall-pdf:
241 for file in $(PDF_TARGETS); do \
242 rm -f $(DESTDIR)$(pdfdir)/$${file}; \
243 done
245 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
248 ### Makefile ends here