* progmodes/octave.el (octave-help): Fix regexp.
[bpt/emacs.git] / doc / emacs / Makefile.in
CommitLineData
df42eec6 1#### Makefile for the Emacs Manual
8cf51b2c 2
ab422c4d 3# Copyright (C) 1994, 1996-2013 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 33## even for out-of-tree builds.
2fecccba 34buildinfodir = $(srcdir)/../../info
2358ae54
GM
35# Directory with the (customized) texinfo.tex file.
36texinfodir = $(srcdir)/../misc
8cf51b2c 37
3fe7cdc8
GM
38MKDIR_P = @MKDIR_P@
39
8045b906
GM
40INFO_EXT=@INFO_EXT@
41# Options used only when making info output.
42# --no-split is only needed because of MS-DOS.
43# For a possible alternative, see
44# http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
45INFO_OPTS=@INFO_OPTS@
46
8cf51b2c
GM
47# The makeinfo program is part of the Texinfo distribution.
48# Use --force so that it generates output even if there are errors.
45eb2a5d 49MAKEINFO = @MAKEINFO@
6446548e 50MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
df42eec6 51
df42eec6 52TEXI2DVI = texi2dvi
703d26ba 53TEXI2PDF = texi2pdf
c12e4a81 54DVIPS = dvips
8cf51b2c 55
8cf51b2c 56
45eb2a5d
WL
57ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
58 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
8cf51b2c 59
df42eec6 60
4c83f6e1
GM
61EMACS_XTRA= \
62 ${srcdir}/emacs-xtra.texi \
8cf51b2c
GM
63 $(srcdir)/arevert-xtra.texi \
64 $(srcdir)/cal-xtra.texi \
65 $(srcdir)/dired-xtra.texi \
66 $(srcdir)/picture-xtra.texi \
67 $(srcdir)/emerge-xtra.texi \
68 $(srcdir)/vc-xtra.texi \
69 $(srcdir)/vc1-xtra.texi \
8cf51b2c
GM
70 $(srcdir)/fortran-xtra.texi \
71 $(srcdir)/msdog-xtra.texi
72
73EMACSSOURCES= \
74 ${srcdir}/emacs.texi \
eef3ab94 75 ${srcdir}/emacsver.texi \
8cf51b2c
GM
76 ${srcdir}/doclicense.texi \
77 ${srcdir}/gpl.texi \
78 ${srcdir}/screen.texi \
79 ${srcdir}/commands.texi \
80 ${srcdir}/entering.texi \
81 ${srcdir}/basic.texi \
82 ${srcdir}/mini.texi \
83 ${srcdir}/m-x.texi \
84 ${srcdir}/help.texi \
85 ${srcdir}/mark.texi \
86 ${srcdir}/killing.texi \
87 ${srcdir}/regs.texi \
88 ${srcdir}/display.texi \
89 ${srcdir}/search.texi \
90 ${srcdir}/fixit.texi \
91 ${srcdir}/files.texi \
92 ${srcdir}/buffers.texi \
93 ${srcdir}/windows.texi \
94 ${srcdir}/frames.texi \
95 ${srcdir}/mule.texi \
8875da1e 96 ${srcdir}/modes.texi \
8cf51b2c
GM
97 ${srcdir}/indent.texi \
98 ${srcdir}/text.texi \
99 ${srcdir}/programs.texi \
100 ${srcdir}/building.texi \
101 ${srcdir}/maintaining.texi \
102 ${srcdir}/abbrevs.texi \
103 ${srcdir}/sending.texi \
104 ${srcdir}/rmail.texi \
105 ${srcdir}/dired.texi \
106 ${srcdir}/calendar.texi \
107 ${srcdir}/misc.texi \
d43f5a42 108 ${srcdir}/package.texi \
8cf51b2c
GM
109 ${srcdir}/custom.texi \
110 ${srcdir}/trouble.texi \
111 ${srcdir}/cmdargs.texi \
112 ${srcdir}/xresources.texi \
113 ${srcdir}/anti.texi \
114 ${srcdir}/macos.texi \
115 ${srcdir}/msdog.texi \
116 ${srcdir}/gnu.texi \
117 ${srcdir}/glossary.texi \
118 ${srcdir}/ack.texi \
119 ${srcdir}/kmacro.texi \
120 $(EMACS_XTRA)
121
abd40fb4 122## This seems pointless. The info/ directory exists in both the
3fe7cdc8 123## repository and the release tarfiles.
ac1a0ce1 124mkinfodir = @${MKDIR_P} ${buildinfodir}
abd40fb4 125
234db610 126.PHONY: info dvi html pdf ps
ea274122 127
ac1a0ce1 128info: $(buildinfodir)/emacs$(INFO_EXT)
0264072d 129dvi: emacs.dvi
234db610 130html: emacs.html
0264072d 131pdf: emacs.pdf
c12e4a81 132ps: emacs.ps
8cf51b2c 133
0264072d
GM
134# Note that all the Info targets build the Info files in srcdir.
135# There is no provision for Info files to exist in the build directory.
8cf51b2c 136# In a distribution of Emacs, the Info files should be up to date.
f48a9cb4 137# Note: "<" is not portable in ordinary make rules.
ac1a0ce1 138$(buildinfodir)/emacs$(INFO_EXT): ${EMACSSOURCES}
abd40fb4 139 $(mkinfodir)
8045b906 140 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs.texi
8cf51b2c
GM
141
142emacs.dvi: ${EMACSSOURCES}
f48a9cb4 143 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
8cf51b2c 144
c12e4a81 145emacs.ps: emacs.dvi
f48a9cb4 146 $(DVIPS) -o $@ emacs.dvi
c12e4a81 147
703d26ba 148emacs.pdf: ${EMACSSOURCES}
f48a9cb4 149 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
703d26ba 150
234db610 151emacs.html: ${EMACSSOURCES}
f48a9cb4 152 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs.texi
8cf51b2c 153
4c83f6e1 154emacs-xtra.dvi: $(EMACS_XTRA)
f48a9cb4 155 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
8cf51b2c 156
c12e4a81 157emacs-xtra.ps: emacs-xtra.dvi
f48a9cb4 158 $(DVIPS) -o $@ emacs-xtra.dvi
c12e4a81 159
4c83f6e1 160emacs-xtra.pdf: $(EMACS_XTRA)
f48a9cb4 161 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
703d26ba 162
4c83f6e1 163.PHONY: mostlyclean clean distclean maintainer-clean infoclean
8cf51b2c 164
4c83f6e1 165## Temp files.
8cf51b2c 166mostlyclean:
4c83f6e1
GM
167 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
168 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
8cf51b2c 169
4c83f6e1 170## Products not in the release tarfiles.
8cf51b2c 171clean: mostlyclean
c12e4a81
GM
172 rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf \
173 emacs.ps emacs-xtra.ps
234db610 174 rm -rf emacs.html/
17ca7950 175 rm -f emacs-manual-${version}.tar*
8cf51b2c
GM
176
177distclean: clean
178
4c83f6e1
GM
179## In the standalone tarfile, the clean rule runs this.
180infoclean:
ac1a0ce1 181 -cd $(buildinfodir) && rm -f emacs$(INFO_EXT) emacs$(INFO_EXT)-[1-9] emacs$(INFO_EXT)-[1-9][0-9]
df42eec6 182
4c83f6e1
GM
183maintainer-clean: distclean infoclean
184
ea274122
GM
185.PHONY: dist
186
4c83f6e1
GM
187## Make a standalone tarfile of the Emacs manual sources.
188## The [c] is a dumb way to prevent configure expanding it.
4c83f6e1 189dist:
17ca7950
GM
190 rm -rf emacs-manual-${version}
191 mkdir emacs-manual-${version}
4c83f6e1 192 cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
17ca7950 193 ${srcdir}/ChangeLog* emacs-manual-${version}/
4393405b 194 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
2fecccba
GM
195 -e 's/^\(buildinfodir *=\).*/\1 ./' \
196 -e 's/^\(clean:.*\)/\1 infoclean/' \
17ca7950
GM
197 -e "s/@ver[s]ion@/${version}/" \
198 ${srcdir}/Makefile.in > emacs-manual-${version}/Makefile
199 tar -cf emacs-manual-${version}.tar emacs-manual-${version}
200 rm -rf emacs-manual-${version}
4c83f6e1 201
df42eec6 202### Makefile ends here