Further mule-menu-keymap doc tweak
[bpt/emacs.git] / doc / emacs / Makefile.in
CommitLineData
df42eec6 1#### Makefile for the Emacs Manual
8cf51b2c 2
f48a9cb4 3# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc.
8cf51b2c
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
8cf51b2c 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.
8cf51b2c
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
0264072d 20SHELL = /bin/sh
8cf51b2c 21
4c83f6e1
GM
22# Where to find the source code. $(srcdir) will be the doc/emacs subdirectory
23# of the source tree. This is set by configure's `--srcdir' option.
8cf51b2c 24srcdir=@srcdir@
8cf51b2c 25
17ca7950
GM
26# Only for make dist.
27version=@version@
28
df42eec6
GM
29## Where the output files go.
30## Note that the setfilename command in the .texi files assumes this.
ea274122
GM
31## This is a bit funny. Because the info files are in the
32## distribution tarfiles, they are always made in $scrdir/../../info,
c1dc72b3
GM
33## even for out-of-tree builds.
34infodir = $(srcdir)/../../info
2358ae54
GM
35# Directory with the (customized) texinfo.tex file.
36texinfodir = $(srcdir)/../misc
8cf51b2c
GM
37
38# The makeinfo program is part of the Texinfo distribution.
39# Use --force so that it generates output even if there are errors.
45eb2a5d 40MAKEINFO = @MAKEINFO@
6446548e 41MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
df42eec6 42
df42eec6 43TEXI2DVI = texi2dvi
703d26ba 44TEXI2PDF = texi2pdf
c12e4a81 45DVIPS = dvips
8cf51b2c 46
8cf51b2c 47
45eb2a5d
WL
48ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
49 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
8cf51b2c 50
df42eec6 51
4c83f6e1
GM
52EMACS_XTRA= \
53 ${srcdir}/emacs-xtra.texi \
8cf51b2c
GM
54 $(srcdir)/arevert-xtra.texi \
55 $(srcdir)/cal-xtra.texi \
56 $(srcdir)/dired-xtra.texi \
57 $(srcdir)/picture-xtra.texi \
58 $(srcdir)/emerge-xtra.texi \
59 $(srcdir)/vc-xtra.texi \
60 $(srcdir)/vc1-xtra.texi \
8cf51b2c
GM
61 $(srcdir)/fortran-xtra.texi \
62 $(srcdir)/msdog-xtra.texi
63
64EMACSSOURCES= \
65 ${srcdir}/emacs.texi \
eef3ab94 66 ${srcdir}/emacsver.texi \
8cf51b2c
GM
67 ${srcdir}/doclicense.texi \
68 ${srcdir}/gpl.texi \
69 ${srcdir}/screen.texi \
70 ${srcdir}/commands.texi \
71 ${srcdir}/entering.texi \
72 ${srcdir}/basic.texi \
73 ${srcdir}/mini.texi \
74 ${srcdir}/m-x.texi \
75 ${srcdir}/help.texi \
76 ${srcdir}/mark.texi \
77 ${srcdir}/killing.texi \
78 ${srcdir}/regs.texi \
79 ${srcdir}/display.texi \
80 ${srcdir}/search.texi \
81 ${srcdir}/fixit.texi \
82 ${srcdir}/files.texi \
83 ${srcdir}/buffers.texi \
84 ${srcdir}/windows.texi \
85 ${srcdir}/frames.texi \
86 ${srcdir}/mule.texi \
8875da1e 87 ${srcdir}/modes.texi \
8cf51b2c
GM
88 ${srcdir}/indent.texi \
89 ${srcdir}/text.texi \
90 ${srcdir}/programs.texi \
91 ${srcdir}/building.texi \
92 ${srcdir}/maintaining.texi \
93 ${srcdir}/abbrevs.texi \
94 ${srcdir}/sending.texi \
95 ${srcdir}/rmail.texi \
96 ${srcdir}/dired.texi \
97 ${srcdir}/calendar.texi \
98 ${srcdir}/misc.texi \
d43f5a42 99 ${srcdir}/package.texi \
8cf51b2c
GM
100 ${srcdir}/custom.texi \
101 ${srcdir}/trouble.texi \
102 ${srcdir}/cmdargs.texi \
103 ${srcdir}/xresources.texi \
104 ${srcdir}/anti.texi \
105 ${srcdir}/macos.texi \
106 ${srcdir}/msdog.texi \
107 ${srcdir}/gnu.texi \
108 ${srcdir}/glossary.texi \
109 ${srcdir}/ack.texi \
110 ${srcdir}/kmacro.texi \
111 $(EMACS_XTRA)
112
abd40fb4
GM
113## This seems pointless. The info/ directory exists in both the
114## repository and the release tarfiles. We do not use any
8cc1d519 115## equivalent of mkdir -p/install-sh -d, so this is not a general
abd40fb4 116## solution anyway. The second test -d is for parallel builds.
c1dc72b3 117mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
abd40fb4 118
234db610 119.PHONY: info dvi html pdf ps
ea274122 120
0264072d 121info: $(infodir)/emacs
0264072d 122dvi: emacs.dvi
234db610 123html: emacs.html
0264072d 124pdf: emacs.pdf
c12e4a81 125ps: emacs.ps
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 129# In a distribution of Emacs, the Info files should be up to date.
f48a9cb4 130# Note: "<" is not portable in ordinary make rules.
abd40fb4
GM
131$(infodir)/emacs: ${EMACSSOURCES}
132 $(mkinfodir)
f48a9cb4 133 $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ ${srcdir}/emacs.texi
8cf51b2c
GM
134
135emacs.dvi: ${EMACSSOURCES}
f48a9cb4 136 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
8cf51b2c 137
c12e4a81 138emacs.ps: emacs.dvi
f48a9cb4 139 $(DVIPS) -o $@ emacs.dvi
c12e4a81 140
703d26ba 141emacs.pdf: ${EMACSSOURCES}
f48a9cb4 142 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
703d26ba 143
234db610 144emacs.html: ${EMACSSOURCES}
f48a9cb4 145 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs.texi
8cf51b2c 146
4c83f6e1 147emacs-xtra.dvi: $(EMACS_XTRA)
f48a9cb4 148 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
8cf51b2c 149
c12e4a81 150emacs-xtra.ps: emacs-xtra.dvi
f48a9cb4 151 $(DVIPS) -o $@ emacs-xtra.dvi
c12e4a81 152
4c83f6e1 153emacs-xtra.pdf: $(EMACS_XTRA)
f48a9cb4 154 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
703d26ba 155
4c83f6e1 156.PHONY: mostlyclean clean distclean maintainer-clean infoclean
8cf51b2c 157
4c83f6e1 158## Temp files.
8cf51b2c 159mostlyclean:
4c83f6e1
GM
160 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
161 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
8cf51b2c 162
4c83f6e1 163## Products not in the release tarfiles.
8cf51b2c 164clean: mostlyclean
c12e4a81
GM
165 rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf \
166 emacs.ps emacs-xtra.ps
234db610 167 rm -rf emacs.html/
17ca7950 168 rm -f emacs-manual-${version}.tar*
8cf51b2c
GM
169
170distclean: clean
171
4c83f6e1
GM
172## In the standalone tarfile, the clean rule runs this.
173infoclean:
c1dc72b3 174 -cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9]
df42eec6 175
4c83f6e1
GM
176maintainer-clean: distclean infoclean
177
ea274122
GM
178.PHONY: dist
179
4c83f6e1
GM
180## Make a standalone tarfile of the Emacs manual sources.
181## The [c] is a dumb way to prevent configure expanding it.
4c83f6e1 182dist:
17ca7950
GM
183 rm -rf emacs-manual-${version}
184 mkdir emacs-manual-${version}
4c83f6e1 185 cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
17ca7950 186 ${srcdir}/ChangeLog* emacs-manual-${version}/
4393405b
GM
187 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
188 -e 's/^\(infodir *=\).*/\1 ./' -e 's/^\(clean:.*\)/\1 infoclean/' \
17ca7950
GM
189 -e "s/@ver[s]ion@/${version}/" \
190 ${srcdir}/Makefile.in > emacs-manual-${version}/Makefile
191 tar -cf emacs-manual-${version}.tar emacs-manual-${version}
192 rm -rf emacs-manual-${version}
4c83f6e1 193
df42eec6 194### Makefile ends here