blob: 0445511b6c2923327b6a6058d13e96feaab50127 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#
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
7AWK = awk
8
9# Set to $(VIMTARGET) when executed from src/Makefile.
10VIMEXE = 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.
14include ../../src/auto/config.mk
15
Restorerb23c1fc2023-11-04 08:57:09 +000016# 17.10.23, added by Restorer
17# Common components
18include makefile_all.mak
Bram Moolenaar4317d9b2005-03-18 20:25:31 +000019
Bram Moolenaar071d4272004-06-13 20:20:40 +000020.SUFFIXES:
21.SUFFIXES: .c .o .txt .html
22
Bram Moolenaare37d50a2008-08-06 17:06:04 +000023all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
25# Use Vim to generate the tags file. Can only be used when Vim has been
26# compiled and installed. Supports multiple languages.
27vimtags: $(DOCS)
Bram Moolenaar23877732020-01-21 22:13:42 +010028 @$(VIMEXE) --clean -esX -V1 -u doctags.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000029
30# Use "doctags" to generate the tags file. Only works for English!
31tags: doctags $(DOCS)
32 ./doctags $(DOCS) | LANG=C LC_ALL=C sort >tags
33 uniq -d -2 tags
34
35doctags: doctags.c
36 $(CC) doctags.c -o doctags
37
38vim.man: vim.1
39 nroff -man vim.1 | sed -e s/.//g > vim.man
40
Bram Moolenaare37d50a2008-08-06 17:06:04 +000041evim.man: evim.1
42 nroff -man evim.1 | sed -e s/.//g > evim.man
43
Bram Moolenaar071d4272004-06-13 20:20:40 +000044vimdiff.man: vimdiff.1
45 nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man
46
47vimtutor.man: vimtutor.1
48 nroff -man vimtutor.1 | sed -e s/.//g > vimtutor.man
49
50xxd.man: xxd.1
51 nroff -man xxd.1 | sed -e s/.//g > xxd.man
52
53uganda.nsis.txt: uganda.txt
Bram Moolenaar7cb769a2017-11-16 17:36:02 +010054 sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78:.*//' \
Bram Moolenaar071d4272004-06-13 20:20:40 +000055 uganda.txt | uniq >uganda.nsis.txt
56
57# Awk version of .txt to .html conversion.
Bram Moolenaarcdda8fe2010-07-21 20:40:27 +020058html: noerrors tags $(HTMLS)
Bram Moolenaar071d4272004-06-13 20:20:40 +000059 @if test -f errors.log; then more errors.log; fi
60
61noerrors:
62 -rm -f errors.log
63
Bram Moolenaarcdda8fe2010-07-21 20:40:27 +020064$(HTMLS): tags.ref
65
Bram Moolenaar071d4272004-06-13 20:20:40 +000066.txt.html:
67 $(AWK) -f makehtml.awk $< >$@
68
Bram Moolenaar371d5402006-03-20 21:47:49 +000069# index.html is the starting point for HTML, but for the help files it is
70# help.txt. Therefore use vimindex.html for index.txt.
71index.html: help.txt
72 $(AWK) -f makehtml.awk help.txt >index.html
73
74vimindex.html: index.txt
75 $(AWK) -f makehtml.awk index.txt >vimindex.html
76
Bram Moolenaar071d4272004-06-13 20:20:40 +000077tags.ref tags.html: tags
78 $(AWK) -f maketags.awk tags >tags.html
79
80# Perl version of .txt to .html conversion.
81# There can't be two rules to produce a .html from a .txt file.
82# Just run over all .txt files each time one changes. It's fast anyway.
83perlhtml: tags $(DOCS)
84 ./vim2html.pl tags $(DOCS)
85
Bram Moolenaar2f058492017-11-30 20:27:52 +010086# Check URLs in the help with "curl".
87test_urls:
88 vim -S test_urls.vim
89
Bram Moolenaar071d4272004-06-13 20:20:40 +000090clean:
Bram Moolenaar08fc4842020-07-10 20:40:23 +020091 -rm -f doctags *.html tags.ref
Bram Moolenaar071d4272004-06-13 20:20:40 +000092
93# These files are in the extra archive, skip if not present
94
95arabic.txt:
96 touch arabic.txt
97
98farsi.txt:
99 touch farsi.txt
100
101hebrew.txt:
102 touch hebrew.txt
103
104russian.txt:
105 touch russian.txt
106
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107gui_w32.txt:
108 touch gui_w32.txt
109
110if_ole.txt:
111 touch if_ole.txt
112
113os_390.txt:
114 touch os_390.txt
115
116os_amiga.txt:
117 touch os_amiga.txt
118
119os_beos.txt:
120 touch os_beos.txt
121
122os_dos.txt:
123 touch os_dos.txt
124
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100125os_haiku.txt:
126 touch os_haiku.txt
127
Bram Moolenaar071d4272004-06-13 20:20:40 +0000128os_mac.txt:
129 touch os_mac.txt
130
131os_mint.txt:
132 touch os_mint.txt
133
134os_msdos.txt:
135 touch os_msdos.txt
136
137os_os2.txt:
138 touch os_os2.txt
139
140os_qnx.txt:
141 touch os_qnx.txt
142
143os_risc.txt:
144 touch os_risc.txt
145
146os_win32.txt:
147 touch os_win32.txt
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000148
Bram Moolenaarb475fb92006-03-02 22:40:52 +0000149# Note that $< works with GNU make while $> works for BSD make.
Bram Moolenaar3991dab2006-03-27 17:01:56 +0000150# Is there a solution that works for both??
Restorerb23c1fc2023-11-04 08:57:09 +0000151vim-da.UTF-8.1: vim-da.1 # 17.10.23, added by Restorer
152 iconv -f latin1 -t utf-8 $< >$@
153
154vimdiff-da.UTF-8.1: vimdiff-da.1 # 17.10.23, added by Restorer
155 iconv -f latin1 -t utf-8 $< >$@
156
157vimtutor-da.UTF-8.1: vimtutor-da.1 # 17.10.23, added by Restorer
158 iconv -f latin1 -t utf-8 $< >$@
159
160vim-de.UTF-8.1: vim-de.1 # 17.10.23, added by Restorer
161 iconv -f latin1 -t utf-8 $< >$@
162
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000163vim-fr.UTF-8.1: vim-fr.1
164 iconv -f latin1 -t utf-8 $< >$@
165
166evim-fr.UTF-8.1: evim-fr.1
167 iconv -f latin1 -t utf-8 $< >$@
168
169vimdiff-fr.UTF-8.1: vimdiff-fr.1
170 iconv -f latin1 -t utf-8 $< >$@
171
172vimtutor-fr.UTF-8.1: vimtutor-fr.1
173 iconv -f latin1 -t utf-8 $< >$@
174
175xxd-fr.UTF-8.1: xxd-fr.1
176 iconv -f latin1 -t utf-8 $< >$@
177
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000178vim-it.UTF-8.1: vim-it.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000179 iconv -f latin1 -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000180
181evim-it.UTF-8.1: evim-it.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000182 iconv -f latin1 -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000183
184vimdiff-it.UTF-8.1: vimdiff-it.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000185 iconv -f latin1 -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000186
187vimtutor-it.UTF-8.1: vimtutor-it.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000188 iconv -f latin1 -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000189
190xxd-it.UTF-8.1: xxd-it.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000191 iconv -f latin1 -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000192
Bram Moolenaare37d50a2008-08-06 17:06:04 +0000193vim-pl.UTF-8.1: vim-pl.1
194 iconv -f latin2 -t utf-8 $< >$@
195
196evim-pl.UTF-8.1: evim-pl.1
197 iconv -f latin2 -t utf-8 $< >$@
198
199vimdiff-pl.UTF-8.1: vimdiff-pl.1
200 iconv -f latin2 -t utf-8 $< >$@
201
202vimtutor-pl.UTF-8.1: vimtutor-pl.1
203 iconv -f latin2 -t utf-8 $< >$@
204
205xxd-pl.UTF-8.1: xxd-pl.1
206 iconv -f latin2 -t utf-8 $< >$@
207
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000208vim-ru.UTF-8.1: vim-ru.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000209 iconv -f KOI8-R -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000210
211evim-ru.UTF-8.1: evim-ru.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000212 iconv -f KOI8-R -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000213
214vimdiff-ru.UTF-8.1: vimdiff-ru.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000215 iconv -f KOI8-R -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000216
217vimtutor-ru.UTF-8.1: vimtutor-ru.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000218 iconv -f KOI8-R -t utf-8 $< >$@
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000219
220xxd-ru.UTF-8.1: xxd-ru.1
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000221 iconv -f KOI8-R -t utf-8 $< >$@
Bram Moolenaarf09715b2020-05-31 14:25:22 +0200222
223vim-tr.UTF-8.1: vim-tr.1
224 iconv -f latin5 -t utf-8 $< >$@
225
226evim-tr.UTF-8.1: evim-tr.1
227 iconv -f latin5 -t utf-8 $< >$@
228
229vimdiff-tr.UTF-8.1: vimdiff-tr.1
230 iconv -f latin5 -t utf-8 $< >$@
231
232vimtutor-tr.UTF-8.1: vimtutor-tr.1
233 iconv -f latin5 -t utf-8 $< >$@