Commit | Line | Data |
---|---|---|
bd6766d3 | 1 | #### -*- Makefile -*- for the Emacs Manual and other documentation. |
e65be2d5 | 2 | |
305fa183 | 3 | # Copyright (C) 2003, 2004 |
e65be2d5 JR |
4 | # Free Software Foundation, Inc. |
5 | ||
6 | # This file is part of GNU Emacs. | |
7 | ||
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) | |
11 | # any later version. | |
12 | ||
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. | |
17 | ||
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. | |
22 | ||
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. | |
27 | srcdir=. | |
28 | ||
29 | infodir = $(srcdir)/../info | |
30 | ||
31 | # The makeinfo program is part of the Texinfo distribution. | |
2e2698e0 | 32 | MAKEINFO = makeinfo --force |
0498520b | 33 | MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat |
2e2698e0 EZ |
34 | INFO_TARGETS = $(infodir)/emacs $(infodir)/emacs-xtra $(infodir)/ccmode \ |
35 | $(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \ | |
36 | $(infodir)/forms $(infodir)/gnus $(infodir)/message \ | |
37 | $(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \ | |
38 | $(infodir)/info $(infodir)/mh-e $(infodir)/reftex \ | |
39 | $(infodir)/sc $(infodir)/vip $(infodir)/viper \ | |
40 | $(infodir)/widget $(infodir)/efaq $(infodir)/ada-mode \ | |
41 | $(infodir)/autotype $(infodir)/calc $(infodir)/idlwave \ | |
42 | $(infodir)/eudc $(infodir)/ebrowse $(infodir)/pcl-cvs \ | |
43 | $(infodir)/woman $(infodir)/eshell $(infodir)/org \ | |
44 | $(infodir)/url $(infodir)/speedbar $(infodir)/tramp \ | |
45 | $(infodir)/ses $(infodir)/smtpmail $(infodir)/flymake | |
e65be2d5 | 46 | DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \ |
2e2698e0 EZ |
47 | ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \ |
48 | gnus.dvi message.dvi sieve.dvi pgg.dvi mh-e.dvi \ | |
e65be2d5 JR |
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 \ | |
2e2698e0 | 51 | pcl-cvs.dvi woman.dvi eshell.dvi org.dvi url.dvi \ |
e8d1b5bf | 52 | speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \ |
2e2698e0 | 53 | emacs-xtra.dvi |
e65be2d5 JR |
54 | INFOSOURCES = info.texi |
55 | ||
56 | # The following rule does not work with all versions of `make'. | |
57 | .SUFFIXES: .texi .dvi | |
58 | .texi.dvi: | |
59 | texi2dvi $< | |
60 | ||
61 | TEXI2DVI = texi2dvi | |
0498520b | 62 | ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ |
e65be2d5 JR |
63 | "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C |
64 | ||
65 | EMACSSOURCES= \ | |
66 | $(srcdir)/emacs.texi \ | |
67 | $(srcdir)/doclicense.texi \ | |
68 | $(srcdir)/screen.texi \ | |
69 | $(srcdir)/commands.texi \ | |
70 | $(srcdir)/entering.texi \ | |
71 | $(srcdir)/basic.texi \ | |
72 | $(srcdir)/mini.texi \ | |
73 | $(srcdir)/m-x.texi \ | |
74 | $(srcdir)/help.texi \ | |
75 | $(srcdir)/mark.texi \ | |
76 | $(srcdir)/killing.texi \ | |
77 | $(srcdir)/regs.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 \ | |
85 | $(srcdir)/mule.texi \ | |
86 | $(srcdir)/major.texi \ | |
87 | $(srcdir)/indent.texi \ | |
88 | $(srcdir)/text.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 \ | |
98 | $(srcdir)/misc.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 \ | |
106 | $(srcdir)/gnu.texi \ | |
107 | $(srcdir)/glossary.texi \ | |
108 | $(srcdir)/ack.texi \ | |
109 | $(srcdir)/kmacro.texi | |
110 | ||
111 | info: $(INFO_TARGETS) | |
112 | $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS) | |
113 | ||
114 | dvi: $(DVI_TARGETS) | |
115 | ||
116 | # Note that all the Info targets build the Info files | |
117 | # in srcdir. There is no provision for Info files | |
118 | # to exist in the build directory. | |
119 | # In a distribution of Emacs, the Info files should be up to date. | |
120 | ||
121 | # The following target uses an explicit -o switch to work around | |
122 | # the @setfilename directive in info.texi, which is required for | |
123 | # the Texinfo distribution. | |
2de2a338 JR |
124 | # Some Windows ports of makeinfo seem to require -o to come before the |
125 | # texi filename, contrary to GNU standards. | |
e65be2d5 JR |
126 | |
127 | $(infodir)/info: $(INFOSOURCES) | |
2de2a338 | 128 | $(MAKEINFO) --no-split -o $@ info.texi |
e65be2d5 JR |
129 | |
130 | info.dvi: $(INFOSOURCES) | |
131 | $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi | |
132 | ||
133 | $(infodir)/emacs: $(EMACSSOURCES) | |
134 | $(MAKEINFO) emacs.texi | |
135 | ||
136 | emacs.dvi: $(EMACSSOURCES) | |
137 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi | |
138 | ||
139 | # This target is here so you could easily get the list of the *.texi | |
140 | # files which belong to the Emacs manual (as opposed to the separate | |
141 | # manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can | |
142 | # say things like "grep foo `make emacsman`". | |
143 | emacsman: | |
144 | @echo $(EMACSSOURCES) | |
145 | ||
146 | $(infodir)/ccmode: cc-mode.texi | |
147 | $(MAKEINFO) cc-mode.texi | |
148 | cc-mode.dvi: cc-mode.texi | |
149 | $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi | |
150 | ||
151 | $(infodir)/ada-mode: ada-mode.texi | |
152 | $(MAKEINFO) ada-mode.texi | |
153 | ada-mode.dvi: ada-mode.texi | |
154 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi | |
155 | ||
156 | $(infodir)/pcl-cvs: pcl-cvs.texi | |
157 | $(MAKEINFO) pcl-cvs.texi | |
158 | pcl-cvs.dvi: pcl-cvs.texi | |
159 | $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi | |
160 | ||
161 | $(infodir)/eshell: eshell.texi | |
162 | $(MAKEINFO) eshell.texi | |
163 | eshell.dvi: eshell.texi | |
164 | $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi | |
165 | ||
166 | $(infodir)/cl: cl.texi | |
167 | $(MAKEINFO) cl.texi | |
168 | cl.dvi: cl.texi | |
169 | $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi | |
170 | ||
171 | $(infodir)/dired-x: dired-x.texi | |
172 | $(MAKEINFO) dired-x.texi | |
173 | dired-x.dvi: dired-x.texi | |
174 | $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi | |
175 | ||
176 | $(infodir)/ediff: ediff.texi | |
177 | $(MAKEINFO) ediff.texi | |
178 | ediff.dvi: ediff.texi | |
179 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi | |
180 | ||
305fa183 JB |
181 | $(infodir)/flymake: flymake.texi |
182 | $(MAKEINFO) flymake.texi | |
183 | flymake.dvi: flymake.texi | |
184 | $(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi | |
185 | ||
e65be2d5 JR |
186 | $(infodir)/forms: forms.texi |
187 | $(MAKEINFO) forms.texi | |
188 | forms.dvi: forms.texi | |
189 | $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi | |
190 | ||
23f87bed | 191 | # gnus/message/emacs-mime/sieve/pgg are part of Gnus: |
e65be2d5 JR |
192 | $(infodir)/gnus: gnus.texi |
193 | $(MAKEINFO) gnus.texi | |
194 | gnus.dvi: gnus.texi | |
2e2698e0 | 195 | sed -e "/@iflatex/,/@end iflatex/d" $(srcdir)/gnus.texi > gnustmp.texi |
e65be2d5 JR |
196 | $(ENVADD) $(TEXI2DVI) gnustmp.texi |
197 | cp gnustmp.dvi $*.dvi | |
198 | rm gnustmp.* | |
8d63d890 | 199 | # |
e65be2d5 JR |
200 | $(infodir)/message: message.texi |
201 | $(MAKEINFO) message.texi | |
202 | message.dvi: message.texi | |
203 | $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi | |
8d63d890 | 204 | # |
23f87bed MB |
205 | $(infodir)/emacs-mime: emacs-mime.texi |
206 | $(MAKEINFO) emacs-mime.texi | |
207 | emacs-mime.dvi: emacs-mime.texi | |
208 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi | |
8d63d890 RS |
209 | # |
210 | $(infodir)/sieve: sieve.texi | |
33ca3973 | 211 | $(MAKEINFO) sieve.texi |
23f87bed | 212 | sieve.dvi: sieve.texi |
33ca3973 | 213 | $(ENVADD) $(TEXI2DVI) $(srcdir)/sieve.texi |
8d63d890 RS |
214 | # |
215 | $(infodir)/pgg: pgg.texi | |
33ca3973 | 216 | $(MAKEINFO) pgg.texi |
23f87bed | 217 | pgg.dvi: pgg.texi |
33ca3973 | 218 | $(ENVADD) $(TEXI2DVI) $(srcdir)/pgg.texi |
e65be2d5 JR |
219 | |
220 | $(infodir)/mh-e: mh-e.texi | |
221 | $(MAKEINFO) mh-e.texi | |
222 | mh-e.dvi: mh-e.texi | |
223 | $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi | |
224 | ||
225 | $(infodir)/reftex: reftex.texi | |
226 | $(MAKEINFO) reftex.texi | |
227 | reftex.dvi: reftex.texi | |
228 | $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi | |
229 | ||
230 | $(infodir)/sc: sc.texi | |
231 | $(MAKEINFO) sc.texi | |
232 | sc.dvi: sc.texi | |
233 | $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi | |
234 | ||
235 | $(infodir)/vip: vip.texi | |
236 | $(MAKEINFO) vip.texi | |
237 | vip.dvi: vip.texi | |
238 | $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi | |
239 | ||
240 | $(infodir)/viper: viper.texi | |
241 | $(MAKEINFO) viper.texi | |
242 | viper.dvi: viper.texi | |
243 | $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi | |
244 | ||
245 | $(infodir)/widget: widget.texi | |
246 | $(MAKEINFO) widget.texi | |
247 | widget.dvi: widget.texi | |
248 | $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi | |
249 | ||
250 | $(infodir)/efaq: faq.texi | |
251 | $(MAKEINFO) faq.texi | |
252 | faq.dvi: faq.texi | |
253 | $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi | |
254 | ||
255 | ../etc/GNU: gnu1.texi gnu.texi | |
256 | $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi | |
257 | ||
258 | $(infodir)/autotype: autotype.texi | |
259 | $(MAKEINFO) autotype.texi | |
260 | autotype.dvi: autotype.texi | |
261 | $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi | |
262 | ||
263 | $(infodir)/calc: calc.texi | |
264 | $(MAKEINFO) calc.texi | |
265 | ||
266 | calc.dvi: calc.texi | |
267 | $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi | |
268 | ||
269 | # This is produced with --no-split to avoid making files whose | |
270 | # names clash on DOS 8+3 filesystems | |
271 | $(infodir)/idlwave: idlwave.texi | |
272 | $(MAKEINFO) --no-split idlwave.texi | |
273 | idlwave.dvi: idlwave.texi | |
274 | $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi | |
275 | ||
276 | $(infodir)/eudc: eudc.texi | |
277 | $(MAKEINFO) eudc.texi | |
278 | eudc.dvi: eudc.texi | |
279 | $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi | |
280 | ||
281 | $(infodir)/ebrowse: ebrowse.texi | |
282 | $(MAKEINFO) ebrowse.texi | |
283 | ebrowse.dvi: ebrowse.texi | |
284 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi | |
285 | ||
286 | $(infodir)/woman: woman.texi | |
287 | $(MAKEINFO) woman.texi | |
288 | woman.dvi: woman.texi | |
289 | $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi | |
290 | ||
291 | $(infodir)/speedbar: speedbar.texi | |
292 | $(MAKEINFO) speedbar.texi | |
293 | speedbar.dvi: speedbar.texi | |
294 | $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi | |
295 | ||
e65be2d5 JR |
296 | $(infodir)/tramp: tramp.texi |
297 | $(MAKEINFO) tramp.texi | |
298 | tramp.dvi: tramp.texi | |
299 | $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi | |
300 | ||
301 | $(infodir)/ses: ses.texi | |
302 | $(MAKEINFO) ses.texi | |
303 | ses.dvi: ses.texi | |
304 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi | |
305 | ||
306 | $(infodir)/smtpmail: smtpmail.texi | |
307 | $(MAKEINFO) smtpmail.texi | |
308 | smtpmail.dvi: smtpmail.texi | |
309 | $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi | |
310 | ||
e8d1b5bf JB |
311 | $(infodir)/emacs-xtra: emacs-xtra.texi |
312 | $(MAKEINFO) emacs-xtra.texi | |
313 | ||
314 | emacs-xtra.dvi: emacs-xtra.texi | |
315 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi | |
316 | ||
e2bcbfbb LT |
317 | $(infodir)/org: org.texi |
318 | $(MAKEINFO) org.texi | |
319 | ||
320 | org.dvi: org.texi | |
321 | $(ENVADD) $(TEXI2DVI) $(srcdir)/org.texi | |
322 | ||
323 | $(infodir)/url: url.texi | |
324 | $(MAKEINFO) url.texi | |
325 | ||
326 | url.dvi: url.texi | |
327 | $(ENVADD) $(TEXI2DVI) $(srcdir)/url.texi | |
328 | ||
e65be2d5 | 329 | mostlyclean: |
5bb0fcd1 | 330 | - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.* |
e65be2d5 JR |
331 | |
332 | clean: mostlyclean | |
5bb0fcd1 JB |
333 | - $(DEL) *.dvi |
334 | - $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \ | |
335 | $(infodir)/cl* $(infodir)/dired-x* \ | |
336 | $(infodir)/ediff* $(infodir)/forms* \ | |
337 | $(infodir)/gnus* $(infodir)/info* \ | |
338 | $(infodir)/message* $(infodir)/mh-e* \ | |
339 | $(infodir)/reftex* $(infodir)/sc* \ | |
e8d1b5bf JB |
340 | $(infodir)/vip* $(infodir)/widget* \ |
341 | $(infodir)/efaq* $(infodir)/ada-mode* \ | |
342 | $(infodir)/autotype* $(infodir)/calc* \ | |
343 | $(infodir)/idlwave* $(infodir)/eudc* \ | |
344 | $(infodir)/ebrowse* $(infodir)/pcl-cvs* \ | |
345 | $(infodir)/woman* $(infodir)/eshell* \ | |
5bb0fcd1 | 346 | $(infodir)/speedbar* $(infodir)/tramp* \ |
e8d1b5bf | 347 | $(infodir)/ses* $(infodir)/smtpmail* \ |
e2bcbfbb | 348 | $(infodir)/url* $(infodir)/org* \ |
e8d1b5bf | 349 | $(infodir)/flymake* |
e65be2d5 JR |
350 | |
351 | distclean: clean | |
352 | ||
353 | maintainer-clean: distclean | |
5bb0fcd1 | 354 | - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc |
e65be2d5 JR |
355 | # Don't delete these, because they are outside the current directory. |
356 | # for file in $(INFO_TARGETS); do rm -f $${file}*; done | |
357 | ||
358 | ||
359 | # Formerly this directory had texindex.c and getopt.c in it | |
360 | # and this makefile built them to make texindex. | |
361 | # That caused trouble because this is run entirely in the source directory. | |
362 | # Since we expect to get texi2dvi from elsewhere, | |
363 | # it is ok to expect texindex from elsewhere also. |