1 #### -*- Makefile -*- for the Emacs Manual and other documentation.
3 # Copyright (C) 2003, 2004, 2005, 2006, 2007 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 2, or (at your option)
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; see the file COPYING. If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
22 # Where to find the source code. The source code for Emacs's C kernel is
23 # expected to be in $(srcdir)/src, and the source code for Emacs's
24 # utility programs is expected to be in $(srcdir)/lib-src. This is
25 # set by the configure script's `--srcdir' option.
28 infodir = $(srcdir)/../info
30 # The makeinfo program is part of the Texinfo distribution.
31 MAKEINFO = makeinfo --force
32 MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat
33 INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \
34 $(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \
35 $(infodir)/forms $(infodir)/gnus $(infodir)/message \
36 $(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \
37 $(infodir)/info $(infodir)/mh-e $(infodir)/reftex \
38 $(infodir)/sc $(infodir)/vip $(infodir)/viper \
39 $(infodir)/widget $(infodir)/efaq $(infodir)/ada-mode \
40 $(infodir)/autotype $(infodir)/calc $(infodir)/idlwave \
41 $(infodir)/eudc $(infodir)/ebrowse $(infodir)/pcl-cvs \
42 $(infodir)/woman $(infodir)/eshell $(infodir)/org \
43 $(infodir)/url $(infodir)/speedbar $(infodir)/tramp \
44 $(infodir)/ses $(infodir)/smtpmail $(infodir)/flymake \
45 $(infodir)/newsticker $(infodir)/rcirc $(infodir)/erc
46 DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \
47 ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \
48 gnus.dvi message.dvi sieve.dvi pgg.dvi mh-e.dvi \
49 reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \
50 ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \
51 pcl-cvs.dvi woman.dvi eshell.dvi org.dvi url.dvi \
52 speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \
53 newsticker.dvi emacs-xtra.dvi rcirc.dvi erc.dvi
54 INFOSOURCES = info.texi
56 # The following rule does not work with all versions of `make'.
62 ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
63 "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
66 $(srcdir)/arevert-xtra.texi \
67 $(srcdir)/cal-xtra.texi \
68 $(srcdir)/dired-xtra.texi \
69 $(srcdir)/picture-xtra.texi \
70 $(srcdir)/emerge-xtra.texi \
71 $(srcdir)/vc-xtra.texi \
72 $(srcdir)/vc1-xtra.texi \
73 $(srcdir)/vc2-xtra.texi \
74 $(srcdir)/fortran-xtra.texi \
75 $(srcdir)/msdog-xtra.texi
78 $(srcdir)/emacs.texi \
79 $(srcdir)/doclicense.texi \
80 $(srcdir)/screen.texi \
81 $(srcdir)/commands.texi \
82 $(srcdir)/entering.texi \
83 $(srcdir)/basic.texi \
88 $(srcdir)/killing.texi \
90 $(srcdir)/display.texi \
91 $(srcdir)/search.texi \
92 $(srcdir)/fixit.texi \
93 $(srcdir)/files.texi \
94 $(srcdir)/buffers.texi \
95 $(srcdir)/windows.texi \
96 $(srcdir)/frames.texi \
98 $(srcdir)/major.texi \
99 $(srcdir)/indent.texi \
100 $(srcdir)/text.texi \
101 $(srcdir)/programs.texi \
102 $(srcdir)/building.texi \
103 $(srcdir)/maintaining.texi \
104 $(srcdir)/abbrevs.texi \
105 $(srcdir)/sending.texi \
106 $(srcdir)/rmail.texi \
107 $(srcdir)/dired.texi \
108 $(srcdir)/calendar.texi \
109 $(srcdir)/misc.texi \
110 $(srcdir)/custom.texi \
111 $(srcdir)/trouble.texi \
112 $(srcdir)/cmdargs.texi \
113 $(srcdir)/xresources.texi \
114 $(srcdir)/anti.texi \
115 $(srcdir)/macos.texi \
116 $(srcdir)/msdog.texi \
118 $(srcdir)/glossary.texi \
120 $(srcdir)/kmacro.texi \
123 info: $(INFO_TARGETS)
127 # Note that all the Info targets build the Info files
128 # in srcdir. There is no provision for Info files
129 # to exist in the build directory.
130 # In a distribution of Emacs, the Info files should be up to date.
132 # The following target uses an explicit -o switch to work around
133 # the @setfilename directive in info.texi, which is required for
134 # the Texinfo distribution.
135 # Some Windows ports of makeinfo seem to require -o to come before the
136 # texi filename, contrary to GNU standards.
139 $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
141 $(infodir)/info: $(INFOSOURCES)
142 $(MAKEINFO) --no-split -o $@ info.texi
144 info.dvi: $(INFOSOURCES)
145 $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi
147 $(infodir)/emacs: $(EMACSSOURCES)
148 $(MAKEINFO) emacs.texi
150 emacs.dvi: $(EMACSSOURCES)
151 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
153 # This target is here so you could easily get the list of the *.texi
154 # files which belong to the Emacs manual (as opposed to the separate
155 # manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can
156 # say things like "grep foo `make emacsman`".
158 @echo $(EMACSSOURCES)
160 $(infodir)/ccmode: cc-mode.texi
161 $(MAKEINFO) cc-mode.texi
162 cc-mode.dvi: cc-mode.texi
163 $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi
165 $(infodir)/ada-mode: ada-mode.texi
166 $(MAKEINFO) ada-mode.texi
167 ada-mode.dvi: ada-mode.texi
168 $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi
170 $(infodir)/pcl-cvs: pcl-cvs.texi
171 $(MAKEINFO) pcl-cvs.texi
172 pcl-cvs.dvi: pcl-cvs.texi
173 $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi
175 $(infodir)/eshell: eshell.texi
176 $(MAKEINFO) eshell.texi
177 eshell.dvi: eshell.texi
178 $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi
180 $(infodir)/cl: cl.texi
183 $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi
185 $(infodir)/dired-x: dired-x.texi
186 $(MAKEINFO) dired-x.texi
187 dired-x.dvi: dired-x.texi
188 $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi
190 $(infodir)/ediff: ediff.texi
191 $(MAKEINFO) ediff.texi
192 ediff.dvi: ediff.texi
193 $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi
195 $(infodir)/flymake: flymake.texi
196 $(MAKEINFO) flymake.texi
197 flymake.dvi: flymake.texi
198 $(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi
200 $(infodir)/forms: forms.texi
201 $(MAKEINFO) forms.texi
202 forms.dvi: forms.texi
203 $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi
205 # gnus/message/emacs-mime/sieve/pgg are part of Gnus:
206 $(infodir)/gnus: gnus.texi
207 $(MAKEINFO) gnus.texi
209 sed -e "/@iflatex/,/@end iflatex/d" $(srcdir)/gnus.texi > gnustmp.texi
210 $(ENVADD) $(TEXI2DVI) gnustmp.texi
211 cp gnustmp.dvi $*.dvi
214 $(infodir)/message: message.texi
215 $(MAKEINFO) message.texi
216 message.dvi: message.texi
217 $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi
219 $(infodir)/emacs-mime: emacs-mime.texi
220 $(MAKEINFO) --enable-encoding emacs-mime.texi
221 emacs-mime.dvi: emacs-mime.texi
222 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi
224 $(infodir)/sieve: sieve.texi
225 $(MAKEINFO) sieve.texi
226 sieve.dvi: sieve.texi
227 $(ENVADD) $(TEXI2DVI) $(srcdir)/sieve.texi
229 $(infodir)/pgg: pgg.texi
232 $(ENVADD) $(TEXI2DVI) $(srcdir)/pgg.texi
234 $(infodir)/mh-e: mh-e.texi
235 $(MAKEINFO) mh-e.texi
237 $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi
239 $(infodir)/reftex: reftex.texi
240 $(MAKEINFO) reftex.texi
241 reftex.dvi: reftex.texi
242 $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi
244 $(infodir)/sc: sc.texi
247 $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi
249 $(infodir)/vip: vip.texi
252 $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi
254 $(infodir)/viper: viper.texi
255 $(MAKEINFO) viper.texi
256 viper.dvi: viper.texi
257 $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi
259 $(infodir)/widget: widget.texi
260 $(MAKEINFO) widget.texi
261 widget.dvi: widget.texi
262 $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi
264 $(infodir)/efaq: faq.texi
267 $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
269 ../etc/GNU: gnu1.texi gnu.texi
270 $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi
272 $(infodir)/autotype: autotype.texi
273 $(MAKEINFO) autotype.texi
274 autotype.dvi: autotype.texi
275 $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi
277 $(infodir)/calc: calc.texi
278 $(MAKEINFO) calc.texi
281 $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi
283 # This is produced with --no-split to avoid making files whose
284 # names clash on DOS 8+3 filesystems
285 $(infodir)/idlwave: idlwave.texi
286 $(MAKEINFO) --no-split idlwave.texi
287 idlwave.dvi: idlwave.texi
288 $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi
290 $(infodir)/eudc: eudc.texi
291 $(MAKEINFO) eudc.texi
293 $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi
295 $(infodir)/ebrowse: ebrowse.texi
296 $(MAKEINFO) ebrowse.texi
297 ebrowse.dvi: ebrowse.texi
298 $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi
300 $(infodir)/woman: woman.texi
301 $(MAKEINFO) woman.texi
302 woman.dvi: woman.texi
303 $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi
305 $(infodir)/speedbar: speedbar.texi
306 $(MAKEINFO) speedbar.texi
307 speedbar.dvi: speedbar.texi
308 $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi
310 $(infodir)/tramp: tramp.texi
311 $(MAKEINFO) tramp.texi
312 tramp.dvi: tramp.texi
313 $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi
315 $(infodir)/ses: ses.texi
318 $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi
320 $(infodir)/smtpmail: smtpmail.texi
321 $(MAKEINFO) smtpmail.texi
322 smtpmail.dvi: smtpmail.texi
323 $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
325 emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
326 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
328 $(infodir)/org: org.texi
331 $(ENVADD) $(TEXI2DVI) $(srcdir)/org.texi
333 $(infodir)/url: url.texi
336 $(ENVADD) $(TEXI2DVI) $(srcdir)/url.texi
338 $(infodir)/newsticker: newsticker.texi
339 $(MAKEINFO) newsticker.texi
340 newsticker.dvi: newsticker.texi
341 $(ENVADD) $(TEXI2DVI) $(srcdir)/newsticker.texi
343 $(infodir)/rcirc: rcirc.texi
344 $(MAKEINFO) rcirc.texi
345 rcirc.dvi: rcirc.texi
346 $(ENVADD) $(TEXI2DVI) $(srcdir)/rcirc.texi
348 $(infodir)/erc: erc.texi
351 $(ENVADD) $(TEXI2DVI) $(srcdir)/erc.texi
354 - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
358 - $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \
359 $(infodir)/cl* $(infodir)/dired-x* \
360 $(infodir)/ediff* $(infodir)/forms* \
361 $(infodir)/gnus* $(infodir)/info* \
362 $(infodir)/message* $(infodir)/mh-e* \
363 $(infodir)/reftex* $(infodir)/sc* \
364 $(infodir)/vip* $(infodir)/widget* \
365 $(infodir)/efaq* $(infodir)/ada-mode* \
366 $(infodir)/autotype* $(infodir)/calc* \
367 $(infodir)/idlwave* $(infodir)/eudc* \
368 $(infodir)/ebrowse* $(infodir)/pcl-cvs* \
369 $(infodir)/woman* $(infodir)/eshell* \
370 $(infodir)/speedbar* $(infodir)/tramp* \
371 $(infodir)/ses* $(infodir)/smtpmail* \
372 $(infodir)/url* $(infodir)/org* \
373 $(infodir)/flymake* $(infodir)/newsticker* \
374 $(infodir)/sieve* $(infodir)/pgg* \
375 $(infodir)/erc* $(infodir)/rcirc*
379 maintainer-clean: distclean
380 - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
381 # Don't delete these, because they are outside the current directory.
382 # for file in $(INFO_TARGETS); do rm -f $${file}*; done
385 # Formerly this directory had texindex.c and getopt.c in it
386 # and this makefile built them to make texindex.
387 # That caused trouble because this is run entirely in the source directory.
388 # Since we expect to get texi2dvi from elsewhere,
389 # it is ok to expect texindex from elsewhere also.