1 #### -*- Makefile -*- for the Emacs Manual
3 # Copyright (C) 2003-2015 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/>.
21 # Where to find the source code. The source code for Emacs's C kernel is
22 # expected to be in $(srcdir)/src, and the source code for Emacs's
23 # utility programs is expected to be in $(srcdir)/lib-src. This is
24 # set by the configure script's '--srcdir' option.
27 infodir = $(srcdir)/../../info
29 # The makeinfo program is part of the Texinfo distribution.
31 MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir)
32 MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat
35 INFO_TARGETS = $(infodir)/emacs$(INFO_EXT)
36 DVI_TARGETS = emacs.dvi
37 INFOSOURCES = info.texi
39 # The following rule does not work with all versions of 'make'.
45 ENVADD = $(srcdir)\..\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
46 "MAKEINFO=$(MAKEINFO) $(MAKEINFO_OPTS)" /C
49 $(srcdir)/arevert-xtra.texi \
50 $(srcdir)/cal-xtra.texi \
51 $(srcdir)/dired-xtra.texi \
52 $(srcdir)/picture-xtra.texi \
53 $(srcdir)/emerge-xtra.texi \
54 $(srcdir)/vc-xtra.texi \
55 $(srcdir)/vc1-xtra.texi \
56 $(srcdir)/fortran-xtra.texi \
57 $(srcdir)/msdos-xtra.texi
60 $(srcdir)/emacs.texi \
61 $(srcdir)/emacsver.texi \
62 $(srcdir)/doclicense.texi \
63 $(srcdir)/screen.texi \
64 $(srcdir)/commands.texi \
65 $(srcdir)/entering.texi \
66 $(srcdir)/basic.texi \
71 $(srcdir)/killing.texi \
73 $(srcdir)/display.texi \
74 $(srcdir)/search.texi \
75 $(srcdir)/fixit.texi \
76 $(srcdir)/files.texi \
77 $(srcdir)/buffers.texi \
78 $(srcdir)/windows.texi \
79 $(srcdir)/frames.texi \
81 $(srcdir)/modes.texi \
82 $(srcdir)/indent.texi \
84 $(srcdir)/programs.texi \
85 $(srcdir)/building.texi \
86 $(srcdir)/maintaining.texi \
87 $(srcdir)/abbrevs.texi \
88 $(srcdir)/sending.texi \
89 $(srcdir)/rmail.texi \
90 $(srcdir)/dired.texi \
91 $(srcdir)/calendar.texi \
93 $(srcdir)/package.texi \
94 $(srcdir)/custom.texi \
95 $(srcdir)/trouble.texi \
96 $(srcdir)/cmdargs.texi \
97 $(srcdir)/xresources.texi \
99 $(srcdir)/macos.texi \
100 $(srcdir)/msdos.texi \
102 $(srcdir)/glossary.texi \
104 $(srcdir)/kmacro.texi \
107 info: $(INFO_TARGETS)
111 # Note that all the Info targets build the Info files
112 # in srcdir. There is no provision for Info files
113 # to exist in the build directory.
114 # In a distribution of Emacs, the Info files should be up to date.
117 $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
119 $(infodir)/emacs$(INFO_EXT): $(EMACSSOURCES)
120 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ emacs.texi
122 emacs.dvi: $(EMACSSOURCES)
123 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
125 emacs.html: $(EMACSSOURCES)
126 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ emacs.texi
128 emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
129 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
132 - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
134 ## FIXME $(infodir)/emacs* deletes too much, eg emacs-mime.
137 - $(DEL) $(infodir)/emacs*
138 - $(DEL_TREE) emacs.html
143 maintainer-clean: distclean
144 - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
145 # Don't delete these, because they are outside the current directory.
146 # for file in $(INFO_TARGETS); do rm -f $${file}*; done
149 # Formerly this directory had texindex.c and getopt.c in it
150 # and this makefile built them to make texindex.
151 # That caused trouble because this is run entirely in the source directory.
152 # Since we expect to get texi2dvi from elsewhere,
153 # it is ok to expect texindex from elsewhere also.