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)/doclicense.texi \
71 $(srcdir)/screen.texi \
72 $(srcdir)/commands.texi \
73 $(srcdir)/entering.texi \
74 $(srcdir)/basic.texi \
79 $(srcdir)/killing.texi \
81 $(srcdir)/display.texi \
82 $(srcdir)/search.texi \
83 $(srcdir)/fixit.texi \
84 $(srcdir)/files.texi \
85 $(srcdir)/buffers.texi \
86 $(srcdir)/windows.texi \
87 $(srcdir)/frames.texi \
89 $(srcdir)/major.texi \
90 $(srcdir)/indent.texi \
92 $(srcdir)/programs.texi \
93 $(srcdir)/building.texi \
94 $(srcdir)/maintaining.texi \
95 $(srcdir)/abbrevs.texi \
96 $(srcdir)/picture.texi \
97 $(srcdir)/sending.texi \
98 $(srcdir)/rmail.texi \
99 $(srcdir)/dired.texi \
100 $(srcdir)/calendar.texi \
101 $(srcdir)/misc.texi \
102 $(srcdir)/custom.texi \
103 $(srcdir)/trouble.texi \
104 $(srcdir)/cmdargs.texi \
105 $(srcdir)/xresources.texi \
106 $(srcdir)/anti.texi \
107 $(srcdir)/macos.texi \
108 $(srcdir)/msdog.texi \
110 $(srcdir)/glossary.texi \
112 $(srcdir)/kmacro.texi
114 info: $(INFO_TARGETS)
115 $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
119 # Note that all the Info targets build the Info files
120 # in srcdir. There is no provision for Info files
121 # to exist in the build directory.
122 # In a distribution of Emacs, the Info files should be up to date.
124 # The following target uses an explicit -o switch to work around
125 # the @setfilename directive in info.texi, which is required for
126 # the Texinfo distribution.
128 $(infodir)/info: $(INFOSOURCES)
129 $(MAKEINFO) --no-split info.texi -o $@
131 info.dvi: $(INFOSOURCES)
132 $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi
134 $(infodir)/emacs: $(EMACSSOURCES)
135 $(MAKEINFO) emacs.texi
137 emacs.dvi: $(EMACSSOURCES)
138 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
140 # This target is here so you could easily get the list of the *.texi
141 # files which belong to the Emacs manual (as opposed to the separate
142 # manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can
143 # say things like "grep foo `make emacsman`".
145 @echo $(EMACSSOURCES)
147 $(infodir)/ccmode: cc-mode.texi
148 $(MAKEINFO) cc-mode.texi
149 cc-mode.dvi: cc-mode.texi
150 $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi
152 $(infodir)/ada-mode: ada-mode.texi
153 $(MAKEINFO) ada-mode.texi
154 ada-mode.dvi: ada-mode.texi
155 $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi
157 $(infodir)/pcl-cvs: pcl-cvs.texi
158 $(MAKEINFO) pcl-cvs.texi
159 pcl-cvs.dvi: pcl-cvs.texi
160 $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi
162 $(infodir)/eshell: eshell.texi
163 $(MAKEINFO) eshell.texi
164 eshell.dvi: eshell.texi
165 $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi
167 $(infodir)/cl: cl.texi
170 $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi
172 $(infodir)/dired-x: dired-x.texi
173 $(MAKEINFO) dired-x.texi
174 dired-x.dvi: dired-x.texi
175 $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi
177 $(infodir)/ediff: ediff.texi
178 $(MAKEINFO) ediff.texi
179 ediff.dvi: ediff.texi
180 $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi
182 $(infodir)/flymake: flymake.texi
183 $(MAKEINFO) flymake.texi
184 flymake.dvi: flymake.texi
185 $(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi
187 $(infodir)/forms: forms.texi
188 $(MAKEINFO) forms.texi
189 forms.dvi: forms.texi
190 $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi
192 $(infodir)/gnus: gnus.texi
193 $(MAKEINFO) gnus.texi
195 sed -e '/@iflatex/,/@end iflatex/d' $(srcdir)/gnus.texi > gnustmp.texi
196 $(ENVADD) $(TEXI2DVI) gnustmp.texi
197 cp gnustmp.dvi $*.dvi
200 $(infodir)/message: message.texi
201 $(MAKEINFO) message.texi
202 message.dvi: message.texi
203 $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi
205 $(infodir)/mh-e: mh-e.texi
206 $(MAKEINFO) mh-e.texi
208 $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi
210 $(infodir)/reftex: reftex.texi
211 $(MAKEINFO) reftex.texi
212 reftex.dvi: reftex.texi
213 $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi
215 $(infodir)/sc: sc.texi
218 $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi
220 $(infodir)/vip: vip.texi
223 $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi
225 $(infodir)/viper: viper.texi
226 $(MAKEINFO) viper.texi
227 viper.dvi: viper.texi
228 $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi
230 $(infodir)/widget: widget.texi
231 $(MAKEINFO) widget.texi
232 widget.dvi: widget.texi
233 $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi
235 $(infodir)/efaq: faq.texi
238 $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
240 ../etc/GNU: gnu1.texi gnu.texi
241 $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi
243 $(infodir)/autotype: autotype.texi
244 $(MAKEINFO) autotype.texi
245 autotype.dvi: autotype.texi
246 $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi
248 $(infodir)/calc: calc.texi
249 $(MAKEINFO) calc.texi
252 $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi
254 # This is produced with --no-split to avoid making files whose
255 # names clash on DOS 8+3 filesystems
256 $(infodir)/idlwave: idlwave.texi
257 $(MAKEINFO) --no-split idlwave.texi
258 idlwave.dvi: idlwave.texi
259 $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi
261 $(infodir)/eudc: eudc.texi
262 $(MAKEINFO) eudc.texi
264 $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi
266 $(infodir)/ebrowse: ebrowse.texi
267 $(MAKEINFO) ebrowse.texi
268 ebrowse.dvi: ebrowse.texi
269 $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi
271 $(infodir)/woman: woman.texi
272 $(MAKEINFO) woman.texi
273 woman.dvi: woman.texi
274 $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi
276 $(infodir)/speedbar: speedbar.texi
277 $(MAKEINFO) speedbar.texi
278 speedbar.dvi: speedbar.texi
279 $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi
281 $(infodir)/emacs-mime: emacs-mime.texi
282 $(MAKEINFO) emacs-mime.texi
283 emacs-mime.dvi: emacs-mime.texi
284 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi
286 $(infodir)/tramp: tramp.texi
287 $(MAKEINFO) tramp.texi
288 tramp.dvi: tramp.texi
289 $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi
291 $(infodir)/ses: ses.texi
294 $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi
296 $(infodir)/smtpmail: smtpmail.texi
297 $(MAKEINFO) smtpmail.texi
298 smtpmail.dvi: smtpmail.texi
299 $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
301 $(infodir)/emacs-xtra: emacs-xtra.texi
302 $(MAKEINFO) emacs-xtra.texi
304 emacs-xtra.dvi: emacs-xtra.texi
305 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
308 - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
312 - $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \
313 $(infodir)/cl* $(infodir)/dired-x* \
314 $(infodir)/ediff* $(infodir)/forms* \
315 $(infodir)/gnus* $(infodir)/info* \
316 $(infodir)/message* $(infodir)/mh-e* \
317 $(infodir)/reftex* $(infodir)/sc* \
318 $(infodir)/vip* $(infodir)/widget* \
319 $(infodir)/efaq* $(infodir)/ada-mode* \
320 $(infodir)/autotype* $(infodir)/calc* \
321 $(infodir)/idlwave* $(infodir)/eudc* \
322 $(infodir)/ebrowse* $(infodir)/pcl-cvs* \
323 $(infodir)/woman* $(infodir)/eshell* \
324 $(infodir)/speedbar* $(infodir)/tramp* \
325 $(infodir)/ses* $(infodir)/smtpmail* \
330 maintainer-clean: distclean
331 - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
332 # Don't delete these, because they are outside the current directory.
333 # for file in $(INFO_TARGETS); do rm -f $${file}*; done
336 # Formerly this directory had texindex.c and getopt.c in it
337 # and this makefile built them to make texindex.
338 # That caused trouble because this is run entirely in the source directory.
339 # Since we expect to get texi2dvi from elsewhere,
340 # it is ok to expect texindex from elsewhere also.