1 #### -*- Makefile -*- for the Emacs Manual and other documentation.
3 # Copyright (C) 2003, 2004, 2005 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)/emacs-xtra $(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 \
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
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)/emacs.texi \
67 $(srcdir)/doclicense.texi \
68 $(srcdir)/screen.texi \
69 $(srcdir)/commands.texi \
70 $(srcdir)/entering.texi \
71 $(srcdir)/basic.texi \
76 $(srcdir)/killing.texi \
78 $(srcdir)/display.texi \
79 $(srcdir)/search.texi \
80 $(srcdir)/fixit.texi \
81 $(srcdir)/files.texi \
82 $(srcdir)/buffers.texi \
83 $(srcdir)/windows.texi \
84 $(srcdir)/frames.texi \
86 $(srcdir)/major.texi \
87 $(srcdir)/indent.texi \
89 $(srcdir)/programs.texi \
90 $(srcdir)/building.texi \
91 $(srcdir)/maintaining.texi \
92 $(srcdir)/abbrevs.texi \
93 $(srcdir)/picture.texi \
94 $(srcdir)/sending.texi \
95 $(srcdir)/rmail.texi \
96 $(srcdir)/dired.texi \
97 $(srcdir)/calendar.texi \
99 $(srcdir)/custom.texi \
100 $(srcdir)/trouble.texi \
101 $(srcdir)/cmdargs.texi \
102 $(srcdir)/xresources.texi \
103 $(srcdir)/anti.texi \
104 $(srcdir)/macos.texi \
105 $(srcdir)/msdog.texi \
107 $(srcdir)/glossary.texi \
109 $(srcdir)/kmacro.texi
111 info: $(INFO_TARGETS)
115 # Note that all the Info targets build the Info files
116 # in srcdir. There is no provision for Info files
117 # to exist in the build directory.
118 # In a distribution of Emacs, the Info files should be up to date.
120 # The following target uses an explicit -o switch to work around
121 # the @setfilename directive in info.texi, which is required for
122 # the Texinfo distribution.
123 # Some Windows ports of makeinfo seem to require -o to come before the
124 # texi filename, contrary to GNU standards.
127 $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
129 $(infodir)/info: $(INFOSOURCES)
130 $(MAKEINFO) --no-split -o $@ info.texi
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 # gnus/message/emacs-mime/sieve/pgg are part of Gnus:
194 $(infodir)/gnus: gnus.texi
195 $(MAKEINFO) gnus.texi
197 sed -e "/@iflatex/,/@end iflatex/d" $(srcdir)/gnus.texi > gnustmp.texi
198 $(ENVADD) $(TEXI2DVI) gnustmp.texi
199 cp gnustmp.dvi $*.dvi
202 $(infodir)/message: message.texi
203 $(MAKEINFO) message.texi
204 message.dvi: message.texi
205 $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi
207 $(infodir)/emacs-mime: emacs-mime.texi
208 $(MAKEINFO) emacs-mime.texi
209 emacs-mime.dvi: emacs-mime.texi
210 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi
212 $(infodir)/sieve: sieve.texi
213 $(MAKEINFO) sieve.texi
214 sieve.dvi: sieve.texi
215 $(ENVADD) $(TEXI2DVI) $(srcdir)/sieve.texi
217 $(infodir)/pgg: pgg.texi
220 $(ENVADD) $(TEXI2DVI) $(srcdir)/pgg.texi
222 $(infodir)/mh-e: mh-e.texi
223 $(MAKEINFO) mh-e.texi
225 $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi
227 $(infodir)/reftex: reftex.texi
228 $(MAKEINFO) reftex.texi
229 reftex.dvi: reftex.texi
230 $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi
232 $(infodir)/sc: sc.texi
235 $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi
237 $(infodir)/vip: vip.texi
240 $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi
242 $(infodir)/viper: viper.texi
243 $(MAKEINFO) viper.texi
244 viper.dvi: viper.texi
245 $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi
247 $(infodir)/widget: widget.texi
248 $(MAKEINFO) widget.texi
249 widget.dvi: widget.texi
250 $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi
252 $(infodir)/efaq: faq.texi
255 $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
257 ../etc/GNU: gnu1.texi gnu.texi
258 $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi
260 $(infodir)/autotype: autotype.texi
261 $(MAKEINFO) autotype.texi
262 autotype.dvi: autotype.texi
263 $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi
265 $(infodir)/calc: calc.texi
266 $(MAKEINFO) calc.texi
269 $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi
271 # This is produced with --no-split to avoid making files whose
272 # names clash on DOS 8+3 filesystems
273 $(infodir)/idlwave: idlwave.texi
274 $(MAKEINFO) --no-split idlwave.texi
275 idlwave.dvi: idlwave.texi
276 $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi
278 $(infodir)/eudc: eudc.texi
279 $(MAKEINFO) eudc.texi
281 $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi
283 $(infodir)/ebrowse: ebrowse.texi
284 $(MAKEINFO) ebrowse.texi
285 ebrowse.dvi: ebrowse.texi
286 $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi
288 $(infodir)/woman: woman.texi
289 $(MAKEINFO) woman.texi
290 woman.dvi: woman.texi
291 $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi
293 $(infodir)/speedbar: speedbar.texi
294 $(MAKEINFO) speedbar.texi
295 speedbar.dvi: speedbar.texi
296 $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi
298 $(infodir)/tramp: tramp.texi
299 $(MAKEINFO) tramp.texi
300 tramp.dvi: tramp.texi
301 $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi
303 $(infodir)/ses: ses.texi
306 $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi
308 $(infodir)/smtpmail: smtpmail.texi
309 $(MAKEINFO) smtpmail.texi
310 smtpmail.dvi: smtpmail.texi
311 $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
313 $(infodir)/emacs-xtra: emacs-xtra.texi
314 $(MAKEINFO) emacs-xtra.texi
316 emacs-xtra.dvi: emacs-xtra.texi
317 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
319 $(infodir)/org: org.texi
322 $(ENVADD) $(TEXI2DVI) $(srcdir)/org.texi
324 $(infodir)/url: url.texi
327 $(ENVADD) $(TEXI2DVI) $(srcdir)/url.texi
329 $(infodir)/newsticker: newsticker.texi
330 $(MAKEINFO) newsticker.texi
331 newsticker.dvi: newsticker.texi
332 $(ENVADD) $(TEXI2DVI) $(srcdir)/newsticker.texi
335 - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
339 - $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \
340 $(infodir)/cl* $(infodir)/dired-x* \
341 $(infodir)/ediff* $(infodir)/forms* \
342 $(infodir)/gnus* $(infodir)/info* \
343 $(infodir)/message* $(infodir)/mh-e* \
344 $(infodir)/reftex* $(infodir)/sc* \
345 $(infodir)/vip* $(infodir)/widget* \
346 $(infodir)/efaq* $(infodir)/ada-mode* \
347 $(infodir)/autotype* $(infodir)/calc* \
348 $(infodir)/idlwave* $(infodir)/eudc* \
349 $(infodir)/ebrowse* $(infodir)/pcl-cvs* \
350 $(infodir)/woman* $(infodir)/eshell* \
351 $(infodir)/speedbar* $(infodir)/tramp* \
352 $(infodir)/ses* $(infodir)/smtpmail* \
353 $(infodir)/url* $(infodir)/org* \
358 maintainer-clean: distclean
359 - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
360 # Don't delete these, because they are outside the current directory.
361 # for file in $(INFO_TARGETS); do rm -f $${file}*; done
364 # Formerly this directory had texindex.c and getopt.c in it
365 # and this makefile built them to make texindex.
366 # That caused trouble because this is run entirely in the source directory.
367 # Since we expect to get texi2dvi from elsewhere,
368 # it is ok to expect texindex from elsewhere also.