* lisp/erc/erc-list.el (erc-list-menu-mode-map): Declare and define in one step.
[bpt/emacs.git] / doc / emacs / Makefile.in
CommitLineData
df42eec6 1#### Makefile for the Emacs Manual
8cf51b2c
GM
2
3# Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
5f874327
GM
4# 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc.
8cf51b2c
GM
6
7# This file is part of GNU Emacs.
8
352c8b4a 9# GNU Emacs is free software: you can redistribute it and/or modify
8cf51b2c 10# it under the terms of the GNU General Public License as published by
352c8b4a
GM
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
8cf51b2c
GM
13
14# GNU Emacs is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18
19# You should have received a copy of the GNU General Public License
352c8b4a
GM
20# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
0264072d 22SHELL = /bin/sh
8cf51b2c 23
4c83f6e1
GM
24# Where to find the source code. $(srcdir) will be the doc/emacs subdirectory
25# of the source tree. This is set by configure's `--srcdir' option.
8cf51b2c 26srcdir=@srcdir@
8cf51b2c 27
17ca7950
GM
28# Only for make dist.
29version=@version@
30
df42eec6
GM
31## Where the output files go.
32## Note that the setfilename command in the .texi files assumes this.
ea274122
GM
33## This is a bit funny. Because the info files are in the
34## distribution tarfiles, they are always made in $scrdir/../../info,
c1dc72b3
GM
35## even for out-of-tree builds.
36infodir = $(srcdir)/../../info
2358ae54
GM
37# Directory with the (customized) texinfo.tex file.
38texinfodir = $(srcdir)/../misc
8cf51b2c
GM
39
40# The makeinfo program is part of the Texinfo distribution.
41# Use --force so that it generates output even if there are errors.
42MAKEINFO = makeinfo --force
df42eec6 43
df42eec6 44TEXI2DVI = texi2dvi
703d26ba 45TEXI2PDF = texi2pdf
8cf51b2c
GM
46
47# The following rule does not work with all versions of `make'.
48.SUFFIXES: .texi .dvi
49.texi.dvi:
df42eec6 50 $(TEXI2DVI) $<
8cf51b2c 51
2358ae54 52ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
8cf51b2c 53
df42eec6 54
4c83f6e1
GM
55EMACS_XTRA= \
56 ${srcdir}/emacs-xtra.texi \
8cf51b2c
GM
57 $(srcdir)/arevert-xtra.texi \
58 $(srcdir)/cal-xtra.texi \
59 $(srcdir)/dired-xtra.texi \
60 $(srcdir)/picture-xtra.texi \
61 $(srcdir)/emerge-xtra.texi \
62 $(srcdir)/vc-xtra.texi \
63 $(srcdir)/vc1-xtra.texi \
8cf51b2c
GM
64 $(srcdir)/fortran-xtra.texi \
65 $(srcdir)/msdog-xtra.texi
66
67EMACSSOURCES= \
68 ${srcdir}/emacs.texi \
eef3ab94 69 ${srcdir}/emacsver.texi \
8cf51b2c
GM
70 ${srcdir}/doclicense.texi \
71 ${srcdir}/gpl.texi \
72 ${srcdir}/screen.texi \
73 ${srcdir}/commands.texi \
74 ${srcdir}/entering.texi \
75 ${srcdir}/basic.texi \
76 ${srcdir}/mini.texi \
77 ${srcdir}/m-x.texi \
78 ${srcdir}/help.texi \
79 ${srcdir}/mark.texi \
80 ${srcdir}/killing.texi \
81 ${srcdir}/regs.texi \
82 ${srcdir}/display.texi \
83 ${srcdir}/search.texi \
84 ${srcdir}/fixit.texi \
85 ${srcdir}/files.texi \
86 ${srcdir}/buffers.texi \
87 ${srcdir}/windows.texi \
88 ${srcdir}/frames.texi \
89 ${srcdir}/mule.texi \
90 ${srcdir}/major.texi \
91 ${srcdir}/indent.texi \
92 ${srcdir}/text.texi \
93 ${srcdir}/programs.texi \
94 ${srcdir}/building.texi \
95 ${srcdir}/maintaining.texi \
96 ${srcdir}/abbrevs.texi \
97 ${srcdir}/sending.texi \
98 ${srcdir}/rmail.texi \
99 ${srcdir}/dired.texi \
100 ${srcdir}/calendar.texi \
101 ${srcdir}/misc.texi \
102 ${srcdir}/custom.texi \
103 ${srcdir}/trouble.texi \
104 ${srcdir}/cmdargs.texi \
105 ${srcdir}/xresources.texi \
106 ${srcdir}/anti.texi \
107 ${srcdir}/macos.texi \
108 ${srcdir}/msdog.texi \
109 ${srcdir}/gnu.texi \
110 ${srcdir}/glossary.texi \
111 ${srcdir}/ack.texi \
112 ${srcdir}/kmacro.texi \
113 $(EMACS_XTRA)
114
abd40fb4
GM
115## This seems pointless. The info/ directory exists in both the
116## repository and the release tarfiles. We do not use any
117## equivalent of mkdir -p/mkinstalldirs, so this is not a general
118## solution anyway. The second test -d is for parallel builds.
c1dc72b3 119mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
abd40fb4 120
ea274122
GM
121.PHONY: info dvi pdf
122
0264072d 123info: $(infodir)/emacs
0264072d
GM
124dvi: emacs.dvi
125pdf: emacs.pdf
8cf51b2c 126
0264072d
GM
127# Note that all the Info targets build the Info files in srcdir.
128# There is no provision for Info files to exist in the build directory.
8cf51b2c
GM
129# In a distribution of Emacs, the Info files should be up to date.
130
abd40fb4
GM
131$(infodir)/emacs: ${EMACSSOURCES}
132 $(mkinfodir)
c1dc72b3 133 $(MAKEINFO) $< -o $@
8cf51b2c
GM
134
135emacs.dvi: ${EMACSSOURCES}
eef3ab94 136 $(ENVADD) $(TEXI2DVI) $<
8cf51b2c 137
703d26ba 138emacs.pdf: ${EMACSSOURCES}
eef3ab94 139 $(ENVADD) $(TEXI2PDF) $<
703d26ba 140
8cf51b2c 141
4c83f6e1 142emacs-xtra.dvi: $(EMACS_XTRA)
eef3ab94 143 $(ENVADD) $(TEXI2DVI) $<
8cf51b2c 144
4c83f6e1 145emacs-xtra.pdf: $(EMACS_XTRA)
eef3ab94 146 $(ENVADD) $(TEXI2PDF) $<
703d26ba 147
4c83f6e1 148.PHONY: mostlyclean clean distclean maintainer-clean infoclean
8cf51b2c 149
4c83f6e1 150## Temp files.
8cf51b2c 151mostlyclean:
4c83f6e1
GM
152 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
153 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
8cf51b2c 154
4c83f6e1 155## Products not in the release tarfiles.
8cf51b2c 156clean: mostlyclean
4c83f6e1 157 rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf
17ca7950 158 rm -f emacs-manual-${version}.tar*
8cf51b2c
GM
159
160distclean: clean
161
4c83f6e1
GM
162## In the standalone tarfile, the clean rule runs this.
163infoclean:
c1dc72b3 164 -cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9]
df42eec6 165
4c83f6e1
GM
166maintainer-clean: distclean infoclean
167
ea274122
GM
168.PHONY: dist
169
4c83f6e1
GM
170## Make a standalone tarfile of the Emacs manual sources.
171## The [c] is a dumb way to prevent configure expanding it.
4c83f6e1 172dist:
17ca7950
GM
173 rm -rf emacs-manual-${version}
174 mkdir emacs-manual-${version}
4c83f6e1 175 cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
17ca7950 176 ${srcdir}/ChangeLog* emacs-manual-${version}/
4393405b
GM
177 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
178 -e 's/^\(infodir *=\).*/\1 ./' -e 's/^\(clean:.*\)/\1 infoclean/' \
17ca7950
GM
179 -e "s/@ver[s]ion@/${version}/" \
180 ${srcdir}/Makefile.in > emacs-manual-${version}/Makefile
181 tar -cf emacs-manual-${version}.tar emacs-manual-${version}
182 rm -rf emacs-manual-${version}
4c83f6e1 183
df42eec6 184### Makefile ends here