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/>.
22 # NB If you add any more configure variables,
23 # update the sed rules in the dist target below.
25 # Standard configure variables.
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
37 datarootdir
= @datarootdir@
39 PACKAGE_TARNAME
= @PACKAGE_TARNAME@
48 GZIP_PROG
= @GZIP_PROG@
50 HTML_OPTS
= --no-split
--html
53 # Options used only when making info output.
57 INSTALL_DATA
= @INSTALL_DATA@
60 MAKEINFO_OPTS
= --force --enable-encoding
-I
$(emacsdir
) -I
$(srcdir)
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
73 # List of all the texinfo files in the manual:
76 $(srcdir)/elisp.texi \
77 $(emacsdir
)/emacsver.texi \
78 $(srcdir)/abbrevs.texi \
79 $(srcdir)/advice.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 \
92 $(srcdir)/files.texi \
93 $(srcdir)/frames.texi \
94 $(srcdir)/functions.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 \
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 \
127 $(srcdir)/doclicense.texi
129 mkinfodir
= @
${MKDIR_P} ${buildinfodir}
131 .PHONY
: info dvi pdf ps
138 info: $(buildinfodir
)/elisp
$(INFO_EXT
)
140 html
: $(HTML_TARGETS
)
144 ## Note: "<" is not portable in ordinary make rules.
145 $(buildinfodir
)/elisp
$(INFO_EXT
): $(srcs
)
147 $(MAKEINFO
) $(MAKEINFO_OPTS
) $(INFO_OPTS
) -o
$@
$(srcdir)/elisp.texi
150 $(ENVADD
) $(TEXI2DVI
) $(srcdir)/elisp.texi
153 $(MAKEINFO
) $(MAKEINFO_OPTS
) $(HTML_OPTS
) -o
$@
$(srcdir)/elisp.texi
156 $(ENVADD
) $(TEXI2PDF
) $(srcdir)/elisp.texi
158 .PHONY
: mostlyclean clean distclean maintainer-clean infoclean
160 ## [12] stuff is from two-volume.make.
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
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*
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
180 ## Note this excludes the two-volume stuff.
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
204 umask
022; $(MKDIR_P
) $(DESTDIR
)$(dvidir
)
205 $(INSTALL_DATA
) $(DVI_TARGETS
) $(DESTDIR
)$(dvidir
)
207 umask
022; $(MKDIR_P
) $(DESTDIR
)$(htmldir
)
208 $(INSTALL_DATA
) $(HTML_TARGETS
) $(DESTDIR
)$(htmldir
)
210 umask
022;$(MKDIR_P
) $(DESTDIR
)$(pdfdir
)
211 $(INSTALL_DATA
) $(PDF_TARGETS
) $(DESTDIR
)$(pdfdir
)
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}; \
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
228 for file in
$(DVI_TARGETS
); do \
229 rm -f
$(DESTDIR
)$(dvidir
)/$${file}; \
232 for file in
$(HTML_TARGETS
); do \
233 rm -f
$(DESTDIR
)$(htmldir
)/$${file}; \
236 ext
= ; [ -n
"${GZIP_PROG}" ] && ext
=.gz
; \
237 for file in
$(PS_TARGETS
); do \
238 rm -f
$(DESTDIR
)$(psdir
)/$${file}$${ext}; \
241 for file in
$(PDF_TARGETS
); do \
242 rm -f
$(DESTDIR
)$(pdfdir
)/$${file}; \
245 uninstall-doc
: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
248 ### Makefile ends here