1 #### -*- Makefile -*- for the Emacs Manual and other documentation.
3 # Copyright (C) 2003, 2004
4 # Free Software Foundation, Inc.
6 # This file is part of GNU Emacs.
8 # GNU Emacs is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
13 # GNU Emacs is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Emacs; see the file COPYING. If not, write to
20 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
23 # Where to find the source code. The source code for Emacs's C kernel is
24 # expected to be in $(srcdir)/src, and the source code for Emacs's
25 # utility programs is expected to be in $(srcdir)/lib-src. This is
26 # set by the configure script's `--srcdir' option.
29 infodir = $(srcdir)/../info
31 # The makeinfo program is part of the Texinfo distribution.
33 MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat
34 INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \
35 $(infodir)/cl $(infodir)/dired-x \
36 $(infodir)/ediff $(infodir)/forms \
37 $(infodir)/gnus $(infodir)/info \
38 $(infodir)/message $(infodir)/mh-e \
39 $(infodir)/reftex $(infodir)/sc \
40 $(infodir)/vip $(infodir)/viper \
41 $(infodir)/widget $(infodir)/efaq \
42 $(infodir)/ada-mode $(infodir)/autotype \
43 $(infodir)/calc $(infodir)/idlwave \
44 $(infodir)/eudc $(infodir)/ebrowse \
45 $(infodir)/pcl-cvs $(infodir)/woman \
46 $(infodir)/emacs-mime $(infodir)/eshell \
47 $(infodir)/speedbar $(infodir)/tramp \
48 $(infodir)/ses $(infodir)/smtpmail \
49 $(infodir)/flymake $(infodir)/emacs-xtra
50 DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \
51 ediff.dvi forms.dvi gnus.dvi message.dvi mh-e.dvi \
52 reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \
53 ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \
54 pcl-cvs.dvi woman.dvi emacs-mime.dvi eshell.dvi \
55 speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \
57 INFOSOURCES = info.texi
59 # The following rule does not work with all versions of `make'.
65 ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
66 "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
69 $(srcdir)/emacs.texi \
70 $(srcdir)/emacs-xtra.texi \
71 $(srcdir)/doclicense.texi \
72 $(srcdir)/screen.texi \
73 $(srcdir)/commands.texi \
74 $(srcdir)/entering.texi \
75 $(srcdir)/basic.texi \
80 $(srcdir)/killing.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 \
90 $(srcdir)/major.texi \
91 $(srcdir)/indent.texi \
93 $(srcdir)/programs.texi \
94 $(srcdir)/building.texi \
95 $(srcdir)/maintaining.texi \
96 $(srcdir)/abbrevs.texi \
97 $(srcdir)/picture.texi \
98 $(srcdir)/sending.texi \
99 $(srcdir)/rmail.texi \
100 $(srcdir)/dired.texi \
101 $(srcdir)/calendar.texi \
102 $(srcdir)/misc.texi \
103 $(srcdir)/custom.texi \
104 $(srcdir)/trouble.texi \
105 $(srcdir)/cmdargs.texi \
106 $(srcdir)/xresources.texi \
107 $(srcdir)/anti.texi \
108 $(srcdir)/macos.texi \
109 $(srcdir)/msdog.texi \
111 $(srcdir)/glossary.texi \
113 $(srcdir)/kmacro.texi
115 info: $(INFO_TARGETS)
116 $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
120 # Note that all the Info targets build the Info files
121 # in srcdir. There is no provision for Info files
122 # to exist in the build directory.
123 # In a distribution of Emacs, the Info files should be up to date.
125 # The following target uses an explicit -o switch to work around
126 # the @setfilename directive in info.texi, which is required for
127 # the Texinfo distribution.
129 $(infodir)/info: $(INFOSOURCES)
130 $(MAKEINFO) --no-split info.texi -o $@
132 info.dvi: $(INFOSOURCES)
133 $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi
135 $(infodir)/emacs: $(EMACSSOURCES)
136 $(MAKEINFO) emacs.texi
138 emacs.dvi: $(EMACSSOURCES)
139 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
141 # This target is here so you could easily get the list of the *.texi
142 # files which belong to the Emacs manual (as opposed to the separate
143 # manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can
144 # say things like "grep foo `make emacsman`".
146 @echo $(EMACSSOURCES)
148 $(infodir)/ccmode: cc-mode.texi
149 $(MAKEINFO) cc-mode.texi
150 cc-mode.dvi: cc-mode.texi
151 $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi
153 $(infodir)/ada-mode: ada-mode.texi
154 $(MAKEINFO) ada-mode.texi
155 ada-mode.dvi: ada-mode.texi
156 $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi
158 $(infodir)/pcl-cvs: pcl-cvs.texi
159 $(MAKEINFO) pcl-cvs.texi
160 pcl-cvs.dvi: pcl-cvs.texi
161 $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi
163 $(infodir)/eshell: eshell.texi
164 $(MAKEINFO) eshell.texi
165 eshell.dvi: eshell.texi
166 $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi
168 $(infodir)/cl: cl.texi
171 $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi
173 $(infodir)/dired-x: dired-x.texi
174 $(MAKEINFO) dired-x.texi
175 dired-x.dvi: dired-x.texi
176 $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi
178 $(infodir)/ediff: ediff.texi
179 $(MAKEINFO) ediff.texi
180 ediff.dvi: ediff.texi
181 $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi
183 $(infodir)/flymake: flymake.texi
184 $(MAKEINFO) flymake.texi
185 flymake.dvi: flymake.texi
186 $(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi
188 $(infodir)/forms: forms.texi
189 $(MAKEINFO) forms.texi
190 forms.dvi: forms.texi
191 $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi
193 $(infodir)/gnus: gnus.texi
194 $(MAKEINFO) gnus.texi
196 sed -e '/@iflatex/,/@end iflatex/d' $(srcdir)/gnus.texi > gnustmp.texi
197 $(ENVADD) $(TEXI2DVI) gnustmp.texi
198 cp gnustmp.dvi $*.dvi
201 $(infodir)/message: message.texi
202 $(MAKEINFO) message.texi
203 message.dvi: message.texi
204 $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi
206 $(infodir)/mh-e: mh-e.texi
207 $(MAKEINFO) mh-e.texi
209 $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi
211 $(infodir)/reftex: reftex.texi
212 $(MAKEINFO) reftex.texi
213 reftex.dvi: reftex.texi
214 $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi
216 $(infodir)/sc: sc.texi
219 $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi
221 $(infodir)/vip: vip.texi
224 $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi
226 $(infodir)/viper: viper.texi
227 $(MAKEINFO) viper.texi
228 viper.dvi: viper.texi
229 $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi
231 $(infodir)/widget: widget.texi
232 $(MAKEINFO) widget.texi
233 widget.dvi: widget.texi
234 $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi
236 $(infodir)/efaq: faq.texi
239 $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
241 ../etc/GNU: gnu1.texi gnu.texi
242 $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi
244 $(infodir)/autotype: autotype.texi
245 $(MAKEINFO) autotype.texi
246 autotype.dvi: autotype.texi
247 $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi
249 $(infodir)/calc: calc.texi
250 $(MAKEINFO) calc.texi
253 $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi
255 # This is produced with --no-split to avoid making files whose
256 # names clash on DOS 8+3 filesystems
257 $(infodir)/idlwave: idlwave.texi
258 $(MAKEINFO) --no-split idlwave.texi
259 idlwave.dvi: idlwave.texi
260 $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi
262 $(infodir)/eudc: eudc.texi
263 $(MAKEINFO) eudc.texi
265 $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi
267 $(infodir)/ebrowse: ebrowse.texi
268 $(MAKEINFO) ebrowse.texi
269 ebrowse.dvi: ebrowse.texi
270 $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi
272 $(infodir)/woman: woman.texi
273 $(MAKEINFO) woman.texi
274 woman.dvi: woman.texi
275 $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi
277 $(infodir)/speedbar: speedbar.texi
278 $(MAKEINFO) speedbar.texi
279 speedbar.dvi: speedbar.texi
280 $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi
282 $(infodir)/emacs-mime: emacs-mime.texi
283 $(MAKEINFO) emacs-mime.texi
284 emacs-mime.dvi: emacs-mime.texi
285 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi
287 $(infodir)/tramp: tramp.texi
288 $(MAKEINFO) tramp.texi
289 tramp.dvi: tramp.texi
290 $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi
292 $(infodir)/ses: ses.texi
295 $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi
297 $(infodir)/smtpmail: smtpmail.texi
298 $(MAKEINFO) smtpmail.texi
299 smtpmail.dvi: smtpmail.texi
300 $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
302 $(infodir)/emacs-xtra: emacs-xtra.texi
303 $(MAKEINFO) emacs-xtra.texi
305 emacs-xtra.dvi: emacs-xtra.texi
306 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
309 - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
313 - $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \
314 $(infodir)/cl* $(infodir)/dired-x* \
315 $(infodir)/ediff* $(infodir)/forms* \
316 $(infodir)/gnus* $(infodir)/info* \
317 $(infodir)/message* $(infodir)/mh-e* \
318 $(infodir)/reftex* $(infodir)/sc* \
319 $(infodir)/vip* $(infodir)/widget* \
320 $(infodir)/efaq* $(infodir)/ada-mode* \
321 $(infodir)/autotype* $(infodir)/calc* \
322 $(infodir)/idlwave* $(infodir)/eudc* \
323 $(infodir)/ebrowse* $(infodir)/pcl-cvs* \
324 $(infodir)/woman* $(infodir)/eshell* \
325 $(infodir)/speedbar* $(infodir)/tramp* \
326 $(infodir)/ses* $(infodir)/smtpmail* \
331 maintainer-clean: distclean
332 - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
333 # Don't delete these, because they are outside the current directory.
334 # for file in $(INFO_TARGETS); do rm -f $${file}*; done
337 # Formerly this directory had texindex.c and getopt.c in it
338 # and this makefile built them to make texindex.
339 # That caused trouble because this is run entirely in the source directory.
340 # Since we expect to get texi2dvi from elsewhere,
341 # it is ok to expect texindex from elsewhere also.