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 $(infodir)/org $(infodir)/url \
51 $(infodir)/pgg $(infodir)/sieve
52 DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \
53 ediff.dvi forms.dvi gnus.dvi message.dvi mh-e.dvi \
54 reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \
55 ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \
56 org.dvi pcl-cvs.dvi woman.dvi emacs-mime.dvi eshell.dvi \
57 speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \
58 emacs-xtra.dvi pgg.dvi sieve.dvi url.dvi
59 INFOSOURCES = info.texi
61 # The following rule does not work with all versions of `make'.
67 ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
68 "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
71 $(srcdir)/emacs.texi \
72 $(srcdir)/doclicense.texi \
73 $(srcdir)/screen.texi \
74 $(srcdir)/commands.texi \
75 $(srcdir)/entering.texi \
76 $(srcdir)/basic.texi \
81 $(srcdir)/killing.texi \
83 $(srcdir)/display.texi \
84 $(srcdir)/search.texi \
85 $(srcdir)/fixit.texi \
86 $(srcdir)/files.texi \
87 $(srcdir)/buffers.texi \
88 $(srcdir)/windows.texi \
89 $(srcdir)/frames.texi \
91 $(srcdir)/major.texi \
92 $(srcdir)/indent.texi \
94 $(srcdir)/programs.texi \
95 $(srcdir)/building.texi \
96 $(srcdir)/maintaining.texi \
97 $(srcdir)/abbrevs.texi \
98 $(srcdir)/picture.texi \
99 $(srcdir)/sending.texi \
100 $(srcdir)/rmail.texi \
101 $(srcdir)/dired.texi \
102 $(srcdir)/calendar.texi \
103 $(srcdir)/misc.texi \
104 $(srcdir)/custom.texi \
105 $(srcdir)/trouble.texi \
106 $(srcdir)/cmdargs.texi \
107 $(srcdir)/xresources.texi \
108 $(srcdir)/anti.texi \
109 $(srcdir)/macos.texi \
110 $(srcdir)/msdog.texi \
112 $(srcdir)/glossary.texi \
114 $(srcdir)/kmacro.texi
116 info: $(INFO_TARGETS)
117 $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
121 # Note that all the Info targets build the Info files
122 # in srcdir. There is no provision for Info files
123 # to exist in the build directory.
124 # In a distribution of Emacs, the Info files should be up to date.
126 # The following target uses an explicit -o switch to work around
127 # the @setfilename directive in info.texi, which is required for
128 # the Texinfo distribution.
129 # Some Windows ports of makeinfo seem to require -o to come before the
130 # texi filename, contrary to GNU standards.
132 $(infodir)/info: $(INFOSOURCES)
133 $(MAKEINFO) --no-split -o $@ info.texi
135 info.dvi: $(INFOSOURCES)
136 $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi
138 $(infodir)/emacs: $(EMACSSOURCES)
139 $(MAKEINFO) emacs.texi
141 emacs.dvi: $(EMACSSOURCES)
142 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
144 # This target is here so you could easily get the list of the *.texi
145 # files which belong to the Emacs manual (as opposed to the separate
146 # manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can
147 # say things like "grep foo `make emacsman`".
149 @echo $(EMACSSOURCES)
151 $(infodir)/ccmode: cc-mode.texi
152 $(MAKEINFO) cc-mode.texi
153 cc-mode.dvi: cc-mode.texi
154 $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi
156 $(infodir)/ada-mode: ada-mode.texi
157 $(MAKEINFO) ada-mode.texi
158 ada-mode.dvi: ada-mode.texi
159 $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi
161 $(infodir)/pcl-cvs: pcl-cvs.texi
162 $(MAKEINFO) pcl-cvs.texi
163 pcl-cvs.dvi: pcl-cvs.texi
164 $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi
166 $(infodir)/eshell: eshell.texi
167 $(MAKEINFO) eshell.texi
168 eshell.dvi: eshell.texi
169 $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi
171 $(infodir)/cl: cl.texi
174 $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi
176 $(infodir)/dired-x: dired-x.texi
177 $(MAKEINFO) dired-x.texi
178 dired-x.dvi: dired-x.texi
179 $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi
181 $(infodir)/ediff: ediff.texi
182 $(MAKEINFO) ediff.texi
183 ediff.dvi: ediff.texi
184 $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi
186 $(infodir)/flymake: flymake.texi
187 $(MAKEINFO) flymake.texi
188 flymake.dvi: flymake.texi
189 $(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi
191 $(infodir)/forms: forms.texi
192 $(MAKEINFO) forms.texi
193 forms.dvi: forms.texi
194 $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi
196 # gnus/message/emacs-mime/sieve/pgg are part of Gnus:
197 $(infodir)/gnus: gnus.texi
198 $(MAKEINFO) gnus.texi
200 sed -e '/@iflatex/,/@end iflatex/d' $(srcdir)/gnus.texi > gnustmp.texi
201 $(ENVADD) $(TEXI2DVI) gnustmp.texi
202 cp gnustmp.dvi $*.dvi
205 $(infodir)/message: message.texi
206 $(MAKEINFO) message.texi
207 message.dvi: message.texi
208 $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi
210 $(infodir)/emacs-mime: emacs-mime.texi
211 $(MAKEINFO) emacs-mime.texi
212 emacs-mime.dvi: emacs-mime.texi
213 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi
215 $(infodir)/sieve: sieve.texi
216 $(MAKEINFO) sieve.texi
217 sieve.dvi: sieve.texi
218 $(ENVADD) $(TEXI2DVI) $(srcdir)/sieve.texi
220 $(infodir)/pgg: pgg.texi
223 $(ENVADD) $(TEXI2DVI) $(srcdir)/pgg.texi
225 $(infodir)/mh-e: mh-e.texi
226 $(MAKEINFO) mh-e.texi
228 $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi
230 $(infodir)/reftex: reftex.texi
231 $(MAKEINFO) reftex.texi
232 reftex.dvi: reftex.texi
233 $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi
235 $(infodir)/sc: sc.texi
238 $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi
240 $(infodir)/vip: vip.texi
243 $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi
245 $(infodir)/viper: viper.texi
246 $(MAKEINFO) viper.texi
247 viper.dvi: viper.texi
248 $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi
250 $(infodir)/widget: widget.texi
251 $(MAKEINFO) widget.texi
252 widget.dvi: widget.texi
253 $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi
255 $(infodir)/efaq: faq.texi
258 $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
260 ../etc/GNU: gnu1.texi gnu.texi
261 $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi
263 $(infodir)/autotype: autotype.texi
264 $(MAKEINFO) autotype.texi
265 autotype.dvi: autotype.texi
266 $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi
268 $(infodir)/calc: calc.texi
269 $(MAKEINFO) calc.texi
272 $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi
274 # This is produced with --no-split to avoid making files whose
275 # names clash on DOS 8+3 filesystems
276 $(infodir)/idlwave: idlwave.texi
277 $(MAKEINFO) --no-split idlwave.texi
278 idlwave.dvi: idlwave.texi
279 $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi
281 $(infodir)/eudc: eudc.texi
282 $(MAKEINFO) eudc.texi
284 $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi
286 $(infodir)/ebrowse: ebrowse.texi
287 $(MAKEINFO) ebrowse.texi
288 ebrowse.dvi: ebrowse.texi
289 $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi
291 $(infodir)/woman: woman.texi
292 $(MAKEINFO) woman.texi
293 woman.dvi: woman.texi
294 $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi
296 $(infodir)/speedbar: speedbar.texi
297 $(MAKEINFO) speedbar.texi
298 speedbar.dvi: speedbar.texi
299 $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi
301 $(infodir)/tramp: tramp.texi
302 $(MAKEINFO) tramp.texi
303 tramp.dvi: tramp.texi
304 $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi
306 $(infodir)/ses: ses.texi
309 $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi
311 $(infodir)/smtpmail: smtpmail.texi
312 $(MAKEINFO) smtpmail.texi
313 smtpmail.dvi: smtpmail.texi
314 $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
316 $(infodir)/emacs-xtra: emacs-xtra.texi
317 $(MAKEINFO) emacs-xtra.texi
319 emacs-xtra.dvi: emacs-xtra.texi
320 $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
322 $(infodir)/org: org.texi
326 $(ENVADD) $(TEXI2DVI) $(srcdir)/org.texi
328 $(infodir)/url: url.texi
332 $(ENVADD) $(TEXI2DVI) $(srcdir)/url.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.