blob: 1c5c3155eb3301540518ea37163505d4e5080caf [file] [log] [blame]
Restorer64c6bfd2023-11-26 14:01:56 +00001#
2# Makefile for converting the Vim tutorial on Windows.
3#
4# 21.11.23, Restorer, restorer@mail2k.ru
5
6
7!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
8!ERROR The program "PowerShell" version 3.0 or higher is required to work
9!ENDIF
10
11# Common components
12!INCLUDE Make_all.mak
13
14# Correct the following line for the directory where iconv is installed.
15# Please do not put the path in quotes.
16ICONV_PATH = D:\Programs\GetText\bin
17
18# In case some package like GnuWin32, UnixUtils, gettext
19# or something similar is installed on the system.
20# If the "iconv" program is installed on the system, but it is not registered
21# in the %PATH% environment variable, then specify the full path to this file.
22!IF EXIST ("iconv.exe")
23ICONV = "iconv.exe"
24!ELSEIF EXIST ("$(ICONV_PATH)\iconv.exe")
25ICONV = "$(ICONV_PATH)\iconv.exe"
26!ENDIF
27
28RM = del /q
29CP = copy /y
Restorer91155eb2024-01-22 22:25:43 +030030PS = PowerShell.exe
31
32PSFLAGS = -NoLogo -NoProfile -Command
Restorer64c6bfd2023-11-26 14:01:56 +000033
34all : $(CONVERTED)
35
36tutor.utf-8 : tutor
37!IF DEFINED (ICONV)
38 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
39!ELSE
Restorer91155eb2024-01-22 22:25:43 +030040 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +000041 [System.Text.Encoding]::GetEncoding(28591)) ^| \
42 1>nul New-Item -Force -ItemType file -Path . -Name $@
43!ENDIF
44
45tutor.bar : tutor.bar.utf-8
46!IF DEFINED (ICONV)
47 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
48!ELSE
Restorer91155eb2024-01-22 22:25:43 +030049 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +000050 [System.IO.File]::ReadAllText(\"$?\", \
51 [System.Text.Encoding]::GetEncoding(65001)), \
52 [System.Text.Encoding]::GetEncoding(28591))
53!ENDIF
54
55tutor.ca.utf-8 : tutor.ca
56!IF DEFINED (ICONV)
57 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
58!ELSE
Restorer91155eb2024-01-22 22:25:43 +030059 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +000060 [System.Text.Encoding]::GetEncoding(28591)) ^| \
61 1>nul New-Item -Force -ItemType file -Path . -Name $@
62!ENDIF
63
64tutor.de.utf-8 : tutor.de
65!IF DEFINED (ICONV)
66 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
67!ELSE
Restorer91155eb2024-01-22 22:25:43 +030068 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +000069 [System.Text.Encoding]::GetEncoding(28591)) ^| \
70 1>nul New-Item -Force -ItemType file -Path . -Name $@
71!ENDIF
72
73tutor.el : tutor.el.utf-8
74!IF DEFINED (ICONV)
75 $(ICONV) -f UTF-8 -t ISO-8859-7 $? >$@
76!ELSE
Restorer91155eb2024-01-22 22:25:43 +030077 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +000078 [System.IO.File]::ReadAllText(\"$?\", \
79 [System.Text.Encoding]::GetEncoding(65001)), \
80 [System.Text.Encoding]::GetEncoding(28597))
81!ENDIF
82
83tutor.el.cp737 : tutor.el.utf-8
84!IF DEFINED (ICONV)
85 $(ICONV) -f UTF-8 -t CP737 $? >$@
86!ELSE
Restorer91155eb2024-01-22 22:25:43 +030087 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +000088 [System.IO.File]::ReadAllText(\"$?\", \
89 [System.Text.Encoding]::GetEncoding(65001)), \
90 [System.Text.Encoding]::GetEncoding(737))
91!ENDIF
92
93tutor.eo : tutor.eo.utf-8
94!IF DEFINED (ICONV)
95 $(ICONV) -f UTF-8 -t ISO-8859-3 $? >$@
96!ELSE
Restorer91155eb2024-01-22 22:25:43 +030097 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +000098 [System.IO.File]::ReadAllText(\"$?\", \
99 [System.Text.Encoding]::GetEncoding(65001)), \
100 [System.Text.Encoding]::GetEncoding(28593))
101!ENDIF
102
103tutor.es : tutor.es.utf-8
104!IF DEFINED (ICONV)
105 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
106!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300107 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000108 [System.IO.File]::ReadAllText(\"$?\", \
109 [System.Text.Encoding]::GetEncoding(65001)), \
110 [System.Text.Encoding]::GetEncoding(28591))
111!ENDIF
112
113tutor.fr.utf-8 : tutor.fr
114!IF DEFINED (ICONV)
115 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
116!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300117 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000118 [System.Text.Encoding]::GetEncoding(28591)) ^| \
119 1>nul New-Item -Force -ItemType file -Path . -Name $@
120!ENDIF
121
122tutor.hr : tutor.hr.utf-8
123!IF DEFINED (ICONV)
124 $(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
125!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300126 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000127 [System.IO.File]::ReadAllText(\"$?\", \
128 [System.Text.Encoding]::GetEncoding(65001)), \
129 [System.Text.Encoding]::GetEncoding(28592))
130!ENDIF
131
132tutor.hr.cp1250 : tutor.hr.utf-8
133!IF DEFINED (ICONV)
134 $(ICONV) -f UTF-8 -t CP1250 $? >$@
135!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300136 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000137 [System.IO.File]::ReadAllText(\"$?\", \
138 [System.Text.Encoding]::GetEncoding(65001)), \
139 [System.Text.Encoding]::GetEncoding(1250))
140!ENDIF
141
142tutor.hu : tutor.hu.utf-8
143!IF DEFINED (ICONV)
144 $(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
145!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300146 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000147 [System.IO.File]::ReadAllText(\"$?\", \
148 [System.Text.Encoding]::GetEncoding(65001)), \
149 [System.Text.Encoding]::GetEncoding(28592))
150!ENDIF
151
152tutor.hu.cp1250 : tutor.hu.utf-8
153!IF DEFINED (ICONV)
154 $(ICONV) -f UTF-8 -t CP1250 $? >$@
155!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300156 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000157 [System.IO.File]::ReadAllText(\"$?\", \
158 [System.Text.Encoding]::GetEncoding(65001)), \
159 [System.Text.Encoding]::GetEncoding(1250))
160!ENDIF
161
162tutor.it.utf-8 : tutor.it
163!IF DEFINED (ICONV)
164 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
165!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300166 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000167 [System.Text.Encoding]::GetEncoding(28591)) ^| \
168 1>nul New-Item -Force -ItemType file -Path . -Name $@
169!ENDIF
170
171tutor.ja.sjis : tutor.ja.utf-8
172!IF DEFINED (ICONV)
173 $(ICONV) -f UTF-8 -t CP932 $? >$@
174!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300175 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000176 [System.IO.File]::ReadAllText(\"$?\", \
177 [System.Text.Encoding]::GetEncoding(65001)), \
178 [System.Text.Encoding]::GetEncoding(932))
179!ENDIF
180
181tutor.ja.euc : tutor.ja.utf-8
182!IF DEFINED (ICONV)
183 $(ICONV) -f UTF-8 -t EUC-JP $? >$@
184!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300185 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000186 [System.IO.File]::ReadAllText(\"$?\", \
187 [System.Text.Encoding]::GetEncoding(65001)), \
188 [System.Text.Encoding]::GetEncoding(51932))
189!ENDIF
190
191tutor.ko.euc : tutor.ko.utf-8
192!IF DEFINED (ICONV)
193 $(ICONV) -f UTF-8 -t EUC-KR $? >$@
194!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300195 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000196 [System.IO.File]::ReadAllText(\"$?\", \
197 [System.Text.Encoding]::GetEncoding(65001)), \
198 [System.Text.Encoding]::GetEncoding(51949))
199!ENDIF
200
201tutor.nl : tutor.nl.utf-8
202!IF DEFINED (ICONV)
203 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
204!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300205 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000206 [System.IO.File]::ReadAllText(\"$?\", \
207 [System.Text.Encoding]::GetEncoding(65001)), \
208 [System.Text.Encoding]::GetEncoding(28591))
209!ENDIF
210
211tutor.no.utf-8 : tutor.no
212!IF DEFINED (ICONV)
213 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
214!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300215 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000216 [System.Text.Encoding]::GetEncoding(28591)) ^| \
217 1>nul New-Item -Force -ItemType file -Path . -Name $@
218!ENDIF
219
220# nb is an alias for no
221tutor.nb : tutor.no
222 $(CP) tutor.no tutor.nb
223
224tutor.nb.utf-8 : tutor.no.utf-8
225 $(CP) tutor.no.utf-8 tutor.nb.utf-8
226
227tutor.ru : tutor.ru.utf-8
228!IF DEFINED (ICONV)
229 $(ICONV) -f UTF-8 -t KOI8-R $? >$@
230!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300231 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000232 [System.IO.File]::ReadAllText(\"$?\", \
233 [System.Text.Encoding]::GetEncoding(65001)), \
234 [System.Text.Encoding]::GetEncoding(20866))
235!ENDIF
236
237tutor.ru.cp1251 : tutor.ru.utf-8
238!IF DEFINED (ICONV)
239 $(ICONV) -f UTF-8 -t CP1251 $? >$@
240!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300241 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000242 [System.IO.File]::ReadAllText(\"$?\", \
243 [System.Text.Encoding]::GetEncoding(65001)), \
244 [System.Text.Encoding]::GetEncoding(1251))
245!ENDIF
246
247tutor.sv.utf-8 : tutor.sv
248!IF DEFINED (ICONV)
249 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
250!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300251 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000252 [System.Text.Encoding]::GetEncoding(28591)) ^| \
253 1>nul New-Item -Force -ItemType file -Path . -Name $@
254!ENDIF
255
256tutor.tr.iso9 : tutor.tr.utf-8
257!IF DEFINED (ICONV)
258 $(ICONV) -f UTF-8 -t ISO-8859-9 $? >$@
259!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300260 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000261 [System.IO.File]::ReadAllText(\"$?\", \
262 [System.Text.Encoding]::GetEncoding(65001)), \
263 [System.Text.Encoding]::GetEncoding(28599))
264!ENDIF
265
266tutor.zh.utf-8 : tutor.zh.big5
Restorer91155eb2024-01-22 22:25:43 +0300267 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000268 [System.Text.Encoding]::GetEncoding(950)) ^| \
269 1>nul New-Item -Force -ItemType file -Path . -Name $@
270
Restorer91155eb2024-01-22 22:25:43 +0300271clean :
272 @for %%G in ($(CONVERTED)) do (if exist .\%%G ($(RM) %%G))
Restorer64c6bfd2023-11-26 14:01:56 +0000273
274# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make: