Disable implicit texi rules in doc/
[bpt/emacs.git] / doc / emacs / Makefile.in
CommitLineData
bbece175 1### @configure_input@
8cf51b2c 2
ba318903 3# Copyright (C) 1994, 1996-2014 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
50b13cde 20SHELL = @SHELL@
8cf51b2c 21
789cf833
GM
22# NB If you add any more configure variables,
23# update the sed rules in the dist target below.
24
4c83f6e1
GM
25# Where to find the source code. $(srcdir) will be the doc/emacs subdirectory
26# of the source tree. This is set by configure's `--srcdir' option.
8cf51b2c 27srcdir=@srcdir@
8cf51b2c 28
17ca7950
GM
29# Only for make dist.
30version=@version@
31
df42eec6
GM
32## Where the output files go.
33## Note that the setfilename command in the .texi files assumes this.
ea274122
GM
34## This is a bit funny. Because the info files are in the
35## distribution tarfiles, they are always made in $scrdir/../../info,
c1dc72b3 36## even for out-of-tree builds.
2fecccba 37buildinfodir = $(srcdir)/../../info
2358ae54
GM
38# Directory with the (customized) texinfo.tex file.
39texinfodir = $(srcdir)/../misc
8cf51b2c 40
8496d8d7
GM
41prefix = @prefix@
42datarootdir = @datarootdir@
43datadir = @datadir@
44PACKAGE_TARNAME = @PACKAGE_TARNAME@
45docdir = @docdir@
46dvidir = @dvidir@
47htmldir = @htmldir@
48pdfdir = @pdfdir@
49psdir = @psdir@
50
3fe7cdc8
GM
51MKDIR_P = @MKDIR_P@
52
8496d8d7
GM
53GZIP_PROG = @GZIP_PROG@
54
55HTML_OPTS = --no-split --html
56
8045b906
GM
57# Options used only when making info output.
58# --no-split is only needed because of MS-DOS.
59# For a possible alternative, see
60# http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
40abffe4 61INFO_OPTS= --no-split
8045b906 62
8496d8d7
GM
63INSTALL = @INSTALL@
64INSTALL_DATA = @INSTALL_DATA@
65
8cf51b2c
GM
66# The makeinfo program is part of the Texinfo distribution.
67# Use --force so that it generates output even if there are errors.
45eb2a5d 68MAKEINFO = @MAKEINFO@
6446548e 69MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
df42eec6 70
df42eec6 71TEXI2DVI = texi2dvi
703d26ba 72TEXI2PDF = texi2pdf
c12e4a81 73DVIPS = dvips
8cf51b2c 74
8cf51b2c 75
45eb2a5d
WL
76ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
77 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
8cf51b2c 78
8496d8d7
GM
79DVI_TARGETS = emacs.dvi emacs-xtra.dvi
80HTML_TARGETS = emacs.html
81PDF_TARGETS = emacs.pdf emacs-xtra.pdf
82PS_TARGETS = emacs.ps emacs-xtra.ps
df42eec6 83
4c83f6e1
GM
84EMACS_XTRA= \
85 ${srcdir}/emacs-xtra.texi \
8cf51b2c
GM
86 $(srcdir)/arevert-xtra.texi \
87 $(srcdir)/cal-xtra.texi \
88 $(srcdir)/dired-xtra.texi \
89 $(srcdir)/picture-xtra.texi \
90 $(srcdir)/emerge-xtra.texi \
91 $(srcdir)/vc-xtra.texi \
92 $(srcdir)/vc1-xtra.texi \
8cf51b2c
GM
93 $(srcdir)/fortran-xtra.texi \
94 $(srcdir)/msdog-xtra.texi
95
96EMACSSOURCES= \
97 ${srcdir}/emacs.texi \
eef3ab94 98 ${srcdir}/emacsver.texi \
8cf51b2c
GM
99 ${srcdir}/doclicense.texi \
100 ${srcdir}/gpl.texi \
101 ${srcdir}/screen.texi \
102 ${srcdir}/commands.texi \
103 ${srcdir}/entering.texi \
104 ${srcdir}/basic.texi \
105 ${srcdir}/mini.texi \
106 ${srcdir}/m-x.texi \
107 ${srcdir}/help.texi \
108 ${srcdir}/mark.texi \
109 ${srcdir}/killing.texi \
110 ${srcdir}/regs.texi \
111 ${srcdir}/display.texi \
112 ${srcdir}/search.texi \
113 ${srcdir}/fixit.texi \
114 ${srcdir}/files.texi \
115 ${srcdir}/buffers.texi \
116 ${srcdir}/windows.texi \
117 ${srcdir}/frames.texi \
118 ${srcdir}/mule.texi \
8875da1e 119 ${srcdir}/modes.texi \
8cf51b2c
GM
120 ${srcdir}/indent.texi \
121 ${srcdir}/text.texi \
122 ${srcdir}/programs.texi \
123 ${srcdir}/building.texi \
124 ${srcdir}/maintaining.texi \
125 ${srcdir}/abbrevs.texi \
126 ${srcdir}/sending.texi \
127 ${srcdir}/rmail.texi \
128 ${srcdir}/dired.texi \
129 ${srcdir}/calendar.texi \
130 ${srcdir}/misc.texi \
d43f5a42 131 ${srcdir}/package.texi \
8cf51b2c
GM
132 ${srcdir}/custom.texi \
133 ${srcdir}/trouble.texi \
134 ${srcdir}/cmdargs.texi \
135 ${srcdir}/xresources.texi \
136 ${srcdir}/anti.texi \
137 ${srcdir}/macos.texi \
138 ${srcdir}/msdog.texi \
139 ${srcdir}/gnu.texi \
140 ${srcdir}/glossary.texi \
141 ${srcdir}/ack.texi \
142 ${srcdir}/kmacro.texi \
143 $(EMACS_XTRA)
144
62bd73fa 145## The info/ directory exists in release tarfiles but not the repository.
ac1a0ce1 146mkinfodir = @${MKDIR_P} ${buildinfodir}
abd40fb4 147
b8e83630
GM
148## Disable implicit rules.
149%.texi: ;
150
234db610 151.PHONY: info dvi html pdf ps
ea274122 152
8496d8d7
GM
153.SUFFIXES: .ps .dvi
154
155.dvi.ps:
156 $(DVIPS) -o $@ $<
157
40abffe4 158info: $(buildinfodir)/emacs.info
8496d8d7
GM
159dvi: $(DVI_TARGETS)
160html: $(HTML_TARGETS)
161pdf: $(PDF_TARGETS)
162ps: $(PS_TARGETS)
8cf51b2c 163
0264072d
GM
164# Note that all the Info targets build the Info files in srcdir.
165# There is no provision for Info files to exist in the build directory.
8cf51b2c 166# In a distribution of Emacs, the Info files should be up to date.
f48a9cb4 167# Note: "<" is not portable in ordinary make rules.
40abffe4 168$(buildinfodir)/emacs.info: ${EMACSSOURCES}
abd40fb4 169 $(mkinfodir)
8045b906 170 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs.texi
8cf51b2c
GM
171
172emacs.dvi: ${EMACSSOURCES}
f48a9cb4 173 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
8cf51b2c 174
703d26ba 175emacs.pdf: ${EMACSSOURCES}
f48a9cb4 176 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
703d26ba 177
234db610 178emacs.html: ${EMACSSOURCES}
8496d8d7 179 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs.texi
8cf51b2c 180
4c83f6e1 181emacs-xtra.dvi: $(EMACS_XTRA)
f48a9cb4 182 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
8cf51b2c 183
4c83f6e1 184emacs-xtra.pdf: $(EMACS_XTRA)
f48a9cb4 185 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
703d26ba 186
0e6929ec 187.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
8cf51b2c 188
4c83f6e1 189## Temp files.
8cf51b2c 190mostlyclean:
4c83f6e1
GM
191 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
192 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
8cf51b2c 193
4c83f6e1 194## Products not in the release tarfiles.
8cf51b2c 195clean: mostlyclean
8496d8d7 196 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
17ca7950 197 rm -f emacs-manual-${version}.tar*
8cf51b2c
GM
198
199distclean: clean
26e4aa7d 200 rm -f Makefile
8cf51b2c 201
4c83f6e1
GM
202## In the standalone tarfile, the clean rule runs this.
203infoclean:
eb36672f 204 rm -f \
40abffe4
GM
205 $(buildinfodir)/emacs.info \
206 $(buildinfodir)/emacs.info-[1-9] \
207 $(buildinfodir)/emacs.info-[1-9][0-9]
df42eec6 208
0e6929ec 209bootstrap-clean maintainer-clean: distclean infoclean
4c83f6e1 210
ea274122
GM
211.PHONY: dist
212
4c83f6e1
GM
213## Make a standalone tarfile of the Emacs manual sources.
214## The [c] is a dumb way to prevent configure expanding it.
4c83f6e1 215dist:
17ca7950
GM
216 rm -rf emacs-manual-${version}
217 mkdir emacs-manual-${version}
4c83f6e1 218 cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
17ca7950 219 ${srcdir}/ChangeLog* emacs-manual-${version}/
4393405b 220 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
2fecccba
GM
221 -e 's/^\(buildinfodir *=\).*/\1 ./' \
222 -e 's/^\(clean:.*\)/\1 infoclean/' \
17ca7950 223 -e "s/@ver[s]ion@/${version}/" \
789cf833 224 -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
17ca7950 225 ${srcdir}/Makefile.in > emacs-manual-${version}/Makefile
fc4893eb
GM
226 @if grep '@[a-zA-Z_]*@' emacs-manual-${version}/Makefile; then \
227 echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
228 fi
17ca7950
GM
229 tar -cf emacs-manual-${version}.tar emacs-manual-${version}
230 rm -rf emacs-manual-${version}
4c83f6e1 231
8496d8d7
GM
232
233.PHONY: install-dvi install-html install-pdf install-ps install-doc
234
235install-dvi: dvi
48f73cfb
GM
236 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
237 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
8496d8d7 238install-html: html
48f73cfb
GM
239 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
240 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
8496d8d7 241install-pdf: pdf
48f73cfb
GM
242 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
243 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
8496d8d7 244install-ps: ps
48f73cfb 245 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
8496d8d7 246 for file in $(PS_TARGETS); do \
48f73cfb 247 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
8496d8d7 248 [ -n "${GZIP_PROG}" ] || continue; \
48f73cfb
GM
249 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
250 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
8496d8d7
GM
251 done
252
253## Top-level Makefile installs the info pages.
254install-doc: install-dvi install-html install-pdf install-ps
255
256
257.PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
258
259uninstall-dvi:
260 for file in $(DVI_TARGETS); do \
48f73cfb 261 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
8496d8d7
GM
262 done
263uninstall-html:
264 for file in $(HTML_TARGETS); do \
48f73cfb 265 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
8496d8d7
GM
266 done
267uninstall-ps:
268 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
269 for file in $(PS_TARGETS); do \
48f73cfb 270 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
8496d8d7
GM
271 done
272uninstall-pdf:
273 for file in $(PDF_TARGETS); do \
48f73cfb 274 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
8496d8d7
GM
275 done
276
277uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
278
279
df42eec6 280### Makefile ends here