7
|
1 #
|
|
2 # Makefile for the Vim documentation on Unix
|
|
3 #
|
|
4 # If you get "don't know how to make scratch", first run make in the source
|
|
5 # directory. Or remove the include below.
|
|
6
|
|
7 AWK = awk
|
|
8
|
|
9 # Set to $(VIMTARGET) when executed from src/Makefile.
|
|
10 VIMEXE = vim
|
|
11
|
|
12 # include the config.mk from the source directory. It's only needed to set
|
|
13 # AWK, used for "make html". Comment this out if the include gives problems.
|
|
14 include ../../src/auto/config.mk
|
|
15
|
|
16 DOCS = \
|
1120
|
17 ada.txt \
|
7
|
18 arabic.txt \
|
|
19 autocmd.txt \
|
|
20 change.txt \
|
|
21 cmdline.txt \
|
|
22 debugger.txt \
|
502
|
23 debug.txt \
|
7
|
24 develop.txt \
|
|
25 diff.txt \
|
|
26 digraph.txt \
|
|
27 editing.txt \
|
|
28 eval.txt \
|
|
29 farsi.txt \
|
|
30 filetype.txt \
|
|
31 fold.txt \
|
|
32 gui.txt \
|
|
33 gui_w16.txt \
|
|
34 gui_w32.txt \
|
|
35 gui_x11.txt \
|
|
36 hangulin.txt \
|
|
37 hebrew.txt \
|
|
38 help.txt \
|
|
39 howto.txt \
|
|
40 if_cscop.txt \
|
36
|
41 if_mzsch.txt \
|
7
|
42 if_ole.txt \
|
|
43 if_perl.txt \
|
|
44 if_pyth.txt \
|
|
45 if_ruby.txt \
|
|
46 if_sniff.txt \
|
|
47 if_tcl.txt \
|
|
48 indent.txt \
|
|
49 index.txt \
|
|
50 insert.txt \
|
|
51 intro.txt \
|
|
52 map.txt \
|
|
53 message.txt \
|
|
54 motion.txt \
|
|
55 mbyte.txt \
|
|
56 mlang.txt \
|
|
57 netbeans.txt \
|
|
58 options.txt \
|
|
59 os_390.txt \
|
|
60 os_amiga.txt \
|
|
61 os_beos.txt \
|
|
62 os_dos.txt \
|
|
63 os_mac.txt \
|
|
64 os_mint.txt \
|
|
65 os_msdos.txt \
|
|
66 os_os2.txt \
|
|
67 os_qnx.txt \
|
|
68 os_risc.txt \
|
|
69 os_unix.txt \
|
|
70 os_vms.txt \
|
|
71 os_win32.txt \
|
|
72 pattern.txt \
|
1120
|
73 pi_getscript.txt \
|
7
|
74 pi_gzip.txt \
|
|
75 pi_netrw.txt \
|
694
|
76 pi_paren.txt \
|
7
|
77 pi_spec.txt \
|
566
|
78 pi_tar.txt \
|
845
|
79 pi_vimball.txt \
|
566
|
80 pi_zip.txt \
|
15
|
81 print.txt \
|
7
|
82 quickfix.txt \
|
|
83 quickref.txt \
|
|
84 quotes.txt \
|
|
85 recover.txt \
|
|
86 remote.txt \
|
|
87 repeat.txt \
|
|
88 rileft.txt \
|
|
89 russian.txt \
|
|
90 scroll.txt \
|
|
91 sign.txt \
|
|
92 sponsor.txt \
|
|
93 starting.txt \
|
220
|
94 spell.txt \
|
718
|
95 sql.txt \
|
7
|
96 syntax.txt \
|
674
|
97 tabpage.txt \
|
7
|
98 tagsrch.txt \
|
|
99 term.txt \
|
|
100 tips.txt \
|
|
101 todo.txt \
|
|
102 uganda.txt \
|
|
103 undo.txt \
|
|
104 usr_01.txt \
|
|
105 usr_02.txt \
|
|
106 usr_03.txt \
|
|
107 usr_04.txt \
|
|
108 usr_05.txt \
|
|
109 usr_06.txt \
|
|
110 usr_07.txt \
|
|
111 usr_08.txt \
|
|
112 usr_09.txt \
|
|
113 usr_10.txt \
|
|
114 usr_11.txt \
|
|
115 usr_12.txt \
|
|
116 usr_20.txt \
|
|
117 usr_21.txt \
|
|
118 usr_22.txt \
|
|
119 usr_23.txt \
|
|
120 usr_24.txt \
|
|
121 usr_25.txt \
|
|
122 usr_26.txt \
|
|
123 usr_27.txt \
|
|
124 usr_28.txt \
|
|
125 usr_29.txt \
|
|
126 usr_30.txt \
|
|
127 usr_31.txt \
|
799
|
128 usr_32.txt \
|
7
|
129 usr_40.txt \
|
|
130 usr_41.txt \
|
|
131 usr_42.txt \
|
|
132 usr_43.txt \
|
|
133 usr_44.txt \
|
|
134 usr_45.txt \
|
|
135 usr_90.txt \
|
|
136 usr_toc.txt \
|
|
137 various.txt \
|
|
138 version4.txt \
|
|
139 version5.txt \
|
|
140 version6.txt \
|
15
|
141 version7.txt \
|
7
|
142 vi_diff.txt \
|
|
143 visual.txt \
|
|
144 windows.txt \
|
|
145 workshop.txt
|
|
146
|
|
147 HTMLS = \
|
1120
|
148 ada.html \
|
7
|
149 arabic.html \
|
|
150 autocmd.html \
|
|
151 change.html \
|
|
152 cmdline.html \
|
502
|
153 debug.html \
|
7
|
154 debugger.html \
|
|
155 develop.html \
|
|
156 diff.html \
|
|
157 digraph.html \
|
|
158 editing.html \
|
|
159 eval.html \
|
|
160 farsi.html \
|
|
161 filetype.html \
|
|
162 fold.html \
|
|
163 gui.html \
|
|
164 gui_w16.html \
|
|
165 gui_w32.html \
|
|
166 gui_x11.html \
|
|
167 hangulin.html \
|
|
168 hebrew.html \
|
|
169 howto.html \
|
|
170 if_cscop.html \
|
36
|
171 if_mzsch.html \
|
7
|
172 if_ole.html \
|
|
173 if_perl.html \
|
|
174 if_pyth.html \
|
|
175 if_ruby.html \
|
|
176 if_sniff.html \
|
|
177 if_tcl.html \
|
|
178 indent.html \
|
|
179 index.html \
|
788
|
180 vimindex.html \
|
7
|
181 insert.html \
|
|
182 intro.html \
|
|
183 map.html \
|
|
184 message.html \
|
|
185 motion.html \
|
|
186 mbyte.html \
|
|
187 mlang.html \
|
|
188 netbeans.html \
|
|
189 options.html \
|
|
190 os_390.html \
|
|
191 os_amiga.html \
|
|
192 os_beos.html \
|
|
193 os_dos.html \
|
|
194 os_mac.html \
|
|
195 os_mint.html \
|
|
196 os_msdos.html \
|
|
197 os_os2.html \
|
|
198 os_qnx.html \
|
|
199 os_risc.html \
|
|
200 os_unix.html \
|
|
201 os_vms.html \
|
|
202 os_win32.html \
|
|
203 pattern.html \
|
1120
|
204 pi_getscript.html \
|
7
|
205 pi_gzip.html \
|
|
206 pi_netrw.html \
|
694
|
207 pi_paren.html \
|
7
|
208 pi_spec.html \
|
845
|
209 pi_tar.html \
|
|
210 pi_vimball.html \
|
|
211 pi_zip.html \
|
15
|
212 print.html \
|
7
|
213 quickfix.html \
|
|
214 quickref.html \
|
|
215 quotes.html \
|
|
216 recover.html \
|
|
217 remote.html \
|
|
218 repeat.html \
|
|
219 rileft.html \
|
|
220 russian.html \
|
|
221 scroll.html \
|
|
222 sign.html \
|
|
223 sponsor.html \
|
|
224 starting.html \
|
220
|
225 spell.html \
|
718
|
226 sql.html \
|
7
|
227 syntax.html \
|
674
|
228 tabpage.html \
|
1120
|
229 tags.html \
|
7
|
230 tagsrch.html \
|
|
231 term.html \
|
|
232 tips.html \
|
|
233 todo.html \
|
|
234 uganda.html \
|
|
235 undo.html \
|
|
236 usr_01.html \
|
|
237 usr_02.html \
|
|
238 usr_03.html \
|
|
239 usr_04.html \
|
|
240 usr_05.html \
|
|
241 usr_06.html \
|
|
242 usr_07.html \
|
|
243 usr_08.html \
|
|
244 usr_09.html \
|
|
245 usr_10.html \
|
|
246 usr_11.html \
|
|
247 usr_12.html \
|
|
248 usr_20.html \
|
|
249 usr_21.html \
|
|
250 usr_22.html \
|
|
251 usr_23.html \
|
|
252 usr_24.html \
|
|
253 usr_25.html \
|
|
254 usr_26.html \
|
|
255 usr_27.html \
|
|
256 usr_28.html \
|
|
257 usr_29.html \
|
|
258 usr_30.html \
|
|
259 usr_31.html \
|
799
|
260 usr_32.html \
|
7
|
261 usr_40.html \
|
|
262 usr_41.html \
|
|
263 usr_42.html \
|
|
264 usr_43.html \
|
|
265 usr_44.html \
|
|
266 usr_45.html \
|
|
267 usr_90.html \
|
|
268 usr_toc.html \
|
|
269 various.html \
|
|
270 version4.html \
|
|
271 version5.html \
|
|
272 version6.html \
|
15
|
273 version7.html \
|
7
|
274 vi_diff.html \
|
|
275 visual.html \
|
|
276 windows.html \
|
|
277 workshop.html
|
|
278
|
216
|
279 CONVERTED = \
|
236
|
280 vim-fr.UTF-8.1 \
|
|
281 evim-fr.UTF-8.1 \
|
|
282 vimdiff-fr.UTF-8.1 \
|
|
283 vimtutor-fr.UTF-8.1 \
|
|
284 xxd-fr.UTF-8.1 \
|
216
|
285 vim-it.UTF-8.1 \
|
|
286 evim-it.UTF-8.1 \
|
|
287 vimdiff-it.UTF-8.1 \
|
|
288 vimtutor-it.UTF-8.1 \
|
|
289 xxd-it.UTF-8.1 \
|
|
290 vim-ru.UTF-8.1 \
|
|
291 evim-ru.UTF-8.1 \
|
|
292 vimdiff-ru.UTF-8.1 \
|
|
293 vimtutor-ru.UTF-8.1 \
|
|
294 xxd-ru.UTF-8.1 \
|
|
295
|
7
|
296 .SUFFIXES:
|
|
297 .SUFFIXES: .c .o .txt .html
|
|
298
|
216
|
299 all: tags vim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
|
7
|
300
|
|
301 # Use Vim to generate the tags file. Can only be used when Vim has been
|
|
302 # compiled and installed. Supports multiple languages.
|
|
303 vimtags: $(DOCS)
|
|
304 $(VIMEXE) -u NONE -esX -c "helptags ." -c quit
|
|
305
|
|
306 # Use "doctags" to generate the tags file. Only works for English!
|
|
307 tags: doctags $(DOCS)
|
|
308 ./doctags $(DOCS) | LANG=C LC_ALL=C sort >tags
|
|
309 uniq -d -2 tags
|
|
310
|
|
311 doctags: doctags.c
|
|
312 $(CC) doctags.c -o doctags
|
|
313
|
|
314 vim.man: vim.1
|
|
315 nroff -man vim.1 | sed -e s/.//g > vim.man
|
|
316
|
|
317 vimdiff.man: vimdiff.1
|
|
318 nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man
|
|
319
|
|
320 vimtutor.man: vimtutor.1
|
|
321 nroff -man vimtutor.1 | sed -e s/.//g > vimtutor.man
|
|
322
|
|
323 xxd.man: xxd.1
|
|
324 nroff -man xxd.1 | sed -e s/.//g > xxd.man
|
|
325
|
|
326 uganda.nsis.txt: uganda.txt
|
|
327 sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78://' \
|
|
328 uganda.txt | uniq >uganda.nsis.txt
|
|
329
|
|
330 # Awk version of .txt to .html conversion.
|
|
331 html: noerrors tags tags.ref $(HTMLS)
|
|
332 @if test -f errors.log; then more errors.log; fi
|
|
333
|
|
334 noerrors:
|
|
335 -rm -f errors.log
|
|
336
|
|
337 .txt.html:
|
|
338 $(AWK) -f makehtml.awk $< >$@
|
|
339
|
788
|
340 # index.html is the starting point for HTML, but for the help files it is
|
|
341 # help.txt. Therefore use vimindex.html for index.txt.
|
|
342 index.html: help.txt
|
|
343 $(AWK) -f makehtml.awk help.txt >index.html
|
|
344
|
|
345 vimindex.html: index.txt
|
|
346 $(AWK) -f makehtml.awk index.txt >vimindex.html
|
|
347
|
7
|
348 tags.ref tags.html: tags
|
|
349 $(AWK) -f maketags.awk tags >tags.html
|
|
350
|
|
351 # Perl version of .txt to .html conversion.
|
|
352 # There can't be two rules to produce a .html from a .txt file.
|
|
353 # Just run over all .txt files each time one changes. It's fast anyway.
|
|
354 perlhtml: tags $(DOCS)
|
|
355 ./vim2html.pl tags $(DOCS)
|
|
356
|
|
357 clean:
|
|
358 -rm doctags *.html tags.ref
|
|
359
|
|
360 # These files are in the extra archive, skip if not present
|
|
361
|
|
362 arabic.txt:
|
|
363 touch arabic.txt
|
|
364
|
|
365 farsi.txt:
|
|
366 touch farsi.txt
|
|
367
|
|
368 hebrew.txt:
|
|
369 touch hebrew.txt
|
|
370
|
|
371 russian.txt:
|
|
372 touch russian.txt
|
|
373
|
|
374 gui_w16.txt:
|
|
375 touch gui_w16.txt
|
|
376
|
|
377 gui_w32.txt:
|
|
378 touch gui_w32.txt
|
|
379
|
|
380 if_ole.txt:
|
|
381 touch if_ole.txt
|
|
382
|
|
383 os_390.txt:
|
|
384 touch os_390.txt
|
|
385
|
|
386 os_amiga.txt:
|
|
387 touch os_amiga.txt
|
|
388
|
|
389 os_beos.txt:
|
|
390 touch os_beos.txt
|
|
391
|
|
392 os_dos.txt:
|
|
393 touch os_dos.txt
|
|
394
|
|
395 os_mac.txt:
|
|
396 touch os_mac.txt
|
|
397
|
|
398 os_mint.txt:
|
|
399 touch os_mint.txt
|
|
400
|
|
401 os_msdos.txt:
|
|
402 touch os_msdos.txt
|
|
403
|
|
404 os_os2.txt:
|
|
405 touch os_os2.txt
|
|
406
|
|
407 os_qnx.txt:
|
|
408 touch os_qnx.txt
|
|
409
|
|
410 os_risc.txt:
|
|
411 touch os_risc.txt
|
|
412
|
|
413 os_win32.txt:
|
|
414 touch os_win32.txt
|
216
|
415
|
701
|
416 # Note that $< works with GNU make while $> works for BSD make.
|
810
|
417 # Is there a solution that works for both??
|
236
|
418 vim-fr.UTF-8.1: vim-fr.1
|
|
419 iconv -f latin1 -t utf-8 $< >$@
|
|
420
|
|
421 evim-fr.UTF-8.1: evim-fr.1
|
|
422 iconv -f latin1 -t utf-8 $< >$@
|
|
423
|
|
424 vimdiff-fr.UTF-8.1: vimdiff-fr.1
|
|
425 iconv -f latin1 -t utf-8 $< >$@
|
|
426
|
|
427 vimtutor-fr.UTF-8.1: vimtutor-fr.1
|
|
428 iconv -f latin1 -t utf-8 $< >$@
|
|
429
|
|
430 xxd-fr.UTF-8.1: xxd-fr.1
|
|
431 iconv -f latin1 -t utf-8 $< >$@
|
|
432
|
216
|
433 vim-it.UTF-8.1: vim-it.1
|
236
|
434 iconv -f latin1 -t utf-8 $< >$@
|
216
|
435
|
|
436 evim-it.UTF-8.1: evim-it.1
|
236
|
437 iconv -f latin1 -t utf-8 $< >$@
|
216
|
438
|
|
439 vimdiff-it.UTF-8.1: vimdiff-it.1
|
236
|
440 iconv -f latin1 -t utf-8 $< >$@
|
216
|
441
|
|
442 vimtutor-it.UTF-8.1: vimtutor-it.1
|
236
|
443 iconv -f latin1 -t utf-8 $< >$@
|
216
|
444
|
|
445 xxd-it.UTF-8.1: xxd-it.1
|
236
|
446 iconv -f latin1 -t utf-8 $< >$@
|
216
|
447
|
|
448 vim-ru.UTF-8.1: vim-ru.1
|
236
|
449 iconv -f KOI8-R -t utf-8 $< >$@
|
216
|
450
|
|
451 evim-ru.UTF-8.1: evim-ru.1
|
236
|
452 iconv -f KOI8-R -t utf-8 $< >$@
|
216
|
453
|
|
454 vimdiff-ru.UTF-8.1: vimdiff-ru.1
|
236
|
455 iconv -f KOI8-R -t utf-8 $< >$@
|
216
|
456
|
|
457 vimtutor-ru.UTF-8.1: vimtutor-ru.1
|
236
|
458 iconv -f KOI8-R -t utf-8 $< >$@
|
216
|
459
|
|
460 xxd-ru.UTF-8.1: xxd-ru.1
|
236
|
461 iconv -f KOI8-R -t utf-8 $< >$@
|