blob: d917f311bf831cb939acc58b082ec58bd013e794 [file] [log] [blame]
Restorer64c6bfd2023-11-26 14:01:56 +00001#
2# Makefile for converting the Vim tutorial on Windows.
3#
RestorerZ12e17292024-12-02 20:13:52 +01004# 21.11.24, Restorer, restorer@mail2k.ru
5#
6# Use the UTF-8 version as the original and create the others with conversion.
7# For some translation files of chapter one, conversion from traditional
8# encodings to UTF-8 encoding is performed.
Restorer64c6bfd2023-11-26 14:01:56 +00009
10
11!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
12!ERROR The program "PowerShell" version 3.0 or higher is required to work
13!ENDIF
14
15# Common components
16!INCLUDE Make_all.mak
17
18# Correct the following line for the directory where iconv is installed.
19# Please do not put the path in quotes.
20ICONV_PATH = D:\Programs\GetText\bin
21
22# In case some package like GnuWin32, UnixUtils, gettext
23# or something similar is installed on the system.
24# If the "iconv" program is installed on the system, but it is not registered
25# in the %PATH% environment variable, then specify the full path to this file.
26!IF EXIST ("iconv.exe")
27ICONV = "iconv.exe"
28!ELSEIF EXIST ("$(ICONV_PATH)\iconv.exe")
29ICONV = "$(ICONV_PATH)\iconv.exe"
30!ENDIF
31
32RM = del /q
33CP = copy /y
RestorerZ12e17292024-12-02 20:13:52 +010034HDLNK = mklink /h
Restorer91155eb2024-01-22 22:25:43 +030035PS = PowerShell.exe
36
37PSFLAGS = -NoLogo -NoProfile -Command
Restorer64c6bfd2023-11-26 14:01:56 +000038
RestorerZ12e17292024-12-02 20:13:52 +010039.SUFFIXES :
40
Restorer64c6bfd2023-11-26 14:01:56 +000041all : $(CONVERTED)
42
RestorerZ12e17292024-12-02 20:13:52 +010043tutor1.utf-8 : tutor1
Restorer64c6bfd2023-11-26 14:01:56 +000044!IF DEFINED (ICONV)
45 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
46!ELSE
Restorer91155eb2024-01-22 22:25:43 +030047 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +000048 [System.Text.Encoding]::GetEncoding(28591)) ^| \
RestorerZ12e17292024-12-02 20:13:52 +010049 1>nul New-Item -Path . -Name $@ -ItemType file -Force
Restorer64c6bfd2023-11-26 14:01:56 +000050!ENDIF
51
RestorerZ12e17292024-12-02 20:13:52 +010052tutor2 : tutor2.utf-8
Restorer64c6bfd2023-11-26 14:01:56 +000053!IF DEFINED (ICONV)
54 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
55!ELSE
Restorer91155eb2024-01-22 22:25:43 +030056 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +000057 [System.IO.File]::ReadAllText(\"$?\", \
58 [System.Text.Encoding]::GetEncoding(65001)), \
59 [System.Text.Encoding]::GetEncoding(28591))
60!ENDIF
61
RestorerZ12e17292024-12-02 20:13:52 +010062tutor1.bar tutor2.bar :
63!IF DEFINED (ICONV)
64 $(ICONV) -f UTF-8 -t ISO-8859-1 $@.utf-8 >$@
65!ELSE
66 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
67 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
68 [System.Text.Encoding]::GetEncoding(65001)), \
69 [System.Text.Encoding]::GetEncoding(28591))
70!ENDIF
71
72tutor1.ca.utf-8 : tutor1.ca
Restorer64c6bfd2023-11-26 14:01:56 +000073!IF DEFINED (ICONV)
74 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
75!ELSE
Restorer91155eb2024-01-22 22:25:43 +030076 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +000077 [System.Text.Encoding]::GetEncoding(28591)) ^| \
RestorerZ12e17292024-12-02 20:13:52 +010078 1>nul New-Item -Path . -Name $@ -ItemType file -Force
Restorer64c6bfd2023-11-26 14:01:56 +000079!ENDIF
80
RestorerZ12e17292024-12-02 20:13:52 +010081tutor2.ca : tutor2.ca.utf-8
Restorer64c6bfd2023-11-26 14:01:56 +000082!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +010083 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
Restorer64c6bfd2023-11-26 14:01:56 +000084!ELSE
Restorer91155eb2024-01-22 22:25:43 +030085 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +000086 [System.IO.File]::ReadAllText(\"$?\", \
87 [System.Text.Encoding]::GetEncoding(65001)), \
RestorerZ12e17292024-12-02 20:13:52 +010088 [System.Text.Encoding]::GetEncoding(28591))
89!ENDIF
90
91tutor1.cs tutor2.cs :
92!IF DEFINED (ICONV)
93 $(ICONV) -f UTF-8 -t ISO-8859-2 $@.utf-8 >$@
94!ELSE
95 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
96 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
97 [System.Text.Encoding]::GetEncoding(65001)), \
98 [System.Text.Encoding]::GetEncoding(28592))
99!ENDIF
100
101tutor1.cs.cp1250 tutor2.cs.cp1250 :
102!IF DEFINED (ICONV)
103 $(ICONV) -f UTF-8 -t CP1250 $(@R).utf-8 >$@
104!ELSE
105 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
106 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
107 [System.Text.Encoding]::GetEncoding(65001)), \
108 [System.Text.Encoding]::GetEncoding(1250))
109!ENDIF
110
111tutor1.da tutor2.da :
112!IF DEFINED (ICONV)
113 $(ICONV) -f UTF-8 -t ISO-8859-4 $@.utf-8 >$@
114!ELSE
115 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
116 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
117 [System.Text.Encoding]::GetEncoding(65001)), \
118 [System.Text.Encoding]::GetEncoding(28594))
119!ENDIF
120
121tutor1.de.utf-8 : tutor1.de
122!IF DEFINED (ICONV)
123 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
124!ELSE
125 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
126 [System.Text.Encoding]::GetEncoding(28591)) ^| \
127 1>nul New-Item -Path . -Name $@ -ItemType file -Force
128!ENDIF
129
130tutor2.de : tutor2.de.utf-8
131!IF DEFINED (ICONV)
132 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
133!ELSE
134 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
135 [System.IO.File]::ReadAllText(\"$?\", \
136 [System.Text.Encoding]::GetEncoding(65001)), \
137 [System.Text.Encoding]::GetEncoding(28591))
138!ENDIF
139
140tutor1.el tutor2.el :
141!IF DEFINED (ICONV)
142 $(ICONV) -f UTF-8 -t ISO-8859-7 $@.utf-8 >$@
143!ELSE
144 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
145 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
146 [System.Text.Encoding]::GetEncoding(65001)), \
Restorer64c6bfd2023-11-26 14:01:56 +0000147 [System.Text.Encoding]::GetEncoding(28597))
148!ENDIF
149
RestorerZ12e17292024-12-02 20:13:52 +0100150tutor1.el.cp737 tutor2.el.cp737 :
Restorer64c6bfd2023-11-26 14:01:56 +0000151!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100152 $(ICONV) -f UTF-8 -t CP737 $(@R).utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000153!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300154 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
RestorerZ12e17292024-12-02 20:13:52 +0100155 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000156 [System.Text.Encoding]::GetEncoding(65001)), \
157 [System.Text.Encoding]::GetEncoding(737))
158!ENDIF
159
RestorerZ12e17292024-12-02 20:13:52 +0100160tutor1.eo tutor2.eo :
Restorer64c6bfd2023-11-26 14:01:56 +0000161!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100162 $(ICONV) -f UTF-8 -t ISO-8859-3 $@.utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000163!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300164 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
RestorerZ12e17292024-12-02 20:13:52 +0100165 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000166 [System.Text.Encoding]::GetEncoding(65001)), \
167 [System.Text.Encoding]::GetEncoding(28593))
168!ENDIF
169
RestorerZ12e17292024-12-02 20:13:52 +0100170tutor1.es tutor2.es :
171!IF DEFINED (ICONV)
172 $(ICONV) -f UTF-8 -t ISO-8859-1 $@.utf-8 >$@
173!ELSE
174 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
175 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
176 [System.Text.Encoding]::GetEncoding(65001)), \
177 [System.Text.Encoding]::GetEncoding(28591))
178!ENDIF
179
180tutor1.fr.utf-8 : tutor1.fr
181!IF DEFINED (ICONV)
182 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
183!ELSE
184 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
185 [System.Text.Encoding]::GetEncoding(28591)) ^| \
186 1>nul New-Item -Path . -Name $@ -ItemType file -Force
187!ENDIF
188
189tutor2.fr : tutor2.fr.utf-8
Restorer64c6bfd2023-11-26 14:01:56 +0000190!IF DEFINED (ICONV)
191 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
192!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300193 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000194 [System.IO.File]::ReadAllText(\"$?\", \
195 [System.Text.Encoding]::GetEncoding(65001)), \
196 [System.Text.Encoding]::GetEncoding(28591))
197!ENDIF
198
RestorerZ12e17292024-12-02 20:13:52 +0100199tutor1.hr tutor2.hr :
200!IF DEFINED (ICONV)
201 $(ICONV) -f UTF-8 -t ISO-8859-2 $@.utf-8 >$@
202!ELSE
203 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
204 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
205 [System.Text.Encoding]::GetEncoding(65001)), \
206 [System.Text.Encoding]::GetEncoding(28592))
207!ENDIF
208
209tutor1.hr.cp1250 tutor2.hr.cp1250 :
210!IF DEFINED (ICONV)
211 $(ICONV) -f UTF-8 -t CP1250 $(@R).utf-8 >$@
212!ELSE
213 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
214 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
215 [System.Text.Encoding]::GetEncoding(65001)), \
216 [System.Text.Encoding]::GetEncoding(1250))
217!ENDIF
218
219tutor1.hu tutor2.hu :
220!IF DEFINED (ICONV)
221 $(ICONV) -f UTF-8 -t ISO-8859-2 $@.utf-8 >$@
222!ELSE
223 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
224 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
225 [System.Text.Encoding]::GetEncoding(65001)), \
226 [System.Text.Encoding]::GetEncoding(28592))
227!ENDIF
228
229tutor1.hu.cp1250 tutor2.hu.cp1250 :
230!IF DEFINED (ICONV)
231 $(ICONV) -f UTF-8 -t CP1250 $(@R).utf-8 >$@
232!ELSE
233 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
234 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
235 [System.Text.Encoding]::GetEncoding(65001)), \
236 [System.Text.Encoding]::GetEncoding(1250))
237!ENDIF
238
239tutor1.it.utf-8 : tutor1.it
Restorer64c6bfd2023-11-26 14:01:56 +0000240!IF DEFINED (ICONV)
241 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
242!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300243 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000244 [System.Text.Encoding]::GetEncoding(28591)) ^| \
RestorerZ12e17292024-12-02 20:13:52 +0100245 1>nul New-Item -Path . -Name $@ -ItemType file -Force
Restorer64c6bfd2023-11-26 14:01:56 +0000246!ENDIF
247
RestorerZ12e17292024-12-02 20:13:52 +0100248tutor2.it : tutor2.it.utf-8
Restorer64c6bfd2023-11-26 14:01:56 +0000249!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100250 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000251!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300252 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000253 [System.IO.File]::ReadAllText(\"$?\", \
254 [System.Text.Encoding]::GetEncoding(65001)), \
RestorerZ12e17292024-12-02 20:13:52 +0100255 [System.Text.Encoding]::GetEncoding(28591))
Restorer64c6bfd2023-11-26 14:01:56 +0000256!ENDIF
257
RestorerZ12e17292024-12-02 20:13:52 +0100258tutor1.ja.sjis tutor2.ja.sjis :
Restorer64c6bfd2023-11-26 14:01:56 +0000259!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100260 $(ICONV) -f UTF-8 -t CP932 $(@R).utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000261!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300262 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
RestorerZ12e17292024-12-02 20:13:52 +0100263 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000264 [System.Text.Encoding]::GetEncoding(65001)), \
265 [System.Text.Encoding]::GetEncoding(932))
266!ENDIF
267
RestorerZ12e17292024-12-02 20:13:52 +0100268tutor1.ja.euc tutor2.ja.euc :
Restorer64c6bfd2023-11-26 14:01:56 +0000269!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100270 $(ICONV) -f UTF-8 -t EUC-JP $(@R).utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000271!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300272 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
RestorerZ12e17292024-12-02 20:13:52 +0100273 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000274 [System.Text.Encoding]::GetEncoding(65001)), \
275 [System.Text.Encoding]::GetEncoding(51932))
276!ENDIF
277
RestorerZ12e17292024-12-02 20:13:52 +0100278tutor1.ko tutor2.ko :
279 $(HDLNK) $@ $@.utf-8
280
281tutor1.ko.euc tutor2.ko.euc :
Restorer64c6bfd2023-11-26 14:01:56 +0000282!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100283 $(ICONV) -f UTF-8 -t EUC-KR $(@R).utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000284!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300285 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
RestorerZ12e17292024-12-02 20:13:52 +0100286 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000287 [System.Text.Encoding]::GetEncoding(65001)), \
288 [System.Text.Encoding]::GetEncoding(51949))
289!ENDIF
290
RestorerZ12e17292024-12-02 20:13:52 +0100291tutor1.nl tutor2.nl :
292!IF DEFINED (ICONV)
293 $(ICONV) -f UTF-8 -t ISO-8859-1 $@.utf-8 >$@
294!ELSE
295 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
296 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
297 [System.Text.Encoding]::GetEncoding(65001)), \
298 [System.Text.Encoding]::GetEncoding(28591))
299!ENDIF
300
301tutor1.no.utf-8 : tutor1.no
302!IF DEFINED (ICONV)
303 $(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
304!ELSE
305 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
306 [System.Text.Encoding]::GetEncoding(28591)) ^| \
307 1>nul New-Item -Path . -Name $@ -ItemType file -Force
308!ENDIF
309
310tutor2.no : tutor2.no.utf-8
Restorer64c6bfd2023-11-26 14:01:56 +0000311!IF DEFINED (ICONV)
312 $(ICONV) -f UTF-8 -t ISO-8859-1 $? >$@
313!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300314 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000315 [System.IO.File]::ReadAllText(\"$?\", \
316 [System.Text.Encoding]::GetEncoding(65001)), \
317 [System.Text.Encoding]::GetEncoding(28591))
318!ENDIF
319
Restorer64c6bfd2023-11-26 14:01:56 +0000320# nb is an alias for no
RestorerZ12e17292024-12-02 20:13:52 +0100321tutor1.nb tutor2.nb : $$(@R).no
322 $(HDLNK) $@ $?
Restorer64c6bfd2023-11-26 14:01:56 +0000323
RestorerZ12e17292024-12-02 20:13:52 +0100324tutor1.nb.utf-8 tutor2.nb.utf-8 : $$(@R)
325 $(HDLNK) $@ %|dpfF.no.utf-8
Restorer64c6bfd2023-11-26 14:01:56 +0000326
RestorerZ12e17292024-12-02 20:13:52 +0100327tutor1.pl tutor2.pl :
Restorer64c6bfd2023-11-26 14:01:56 +0000328!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100329 $(ICONV) -f UTF-8 -t ISO-8859-2 $@.utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000330!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300331 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
RestorerZ12e17292024-12-02 20:13:52 +0100332 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
333 [System.Text.Encoding]::GetEncoding(65001)), \
334 [System.Text.Encoding]::GetEncoding(28592))
335!ENDIF
336
337tutor1.pl.cp1250 tutor2.pl.cp1250 :
338!IF DEFINED (ICONV)
339 $(ICONV) -f UTF-8 -t CP1250 $(@R).utf-8 >$@
340!ELSE
341 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
342 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
343 [System.Text.Encoding]::GetEncoding(65001)), \
344 [System.Text.Encoding]::GetEncoding(1252))
345!ENDIF
346
347tutor1.pt tutor2.pt :
348!IF DEFINED (ICONV)
349 $(ICONV) -f UTF-8 -t ISO-8859-15 $@.utf-8 >$@
350!ELSE
351 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
352 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
353 [System.Text.Encoding]::GetEncoding(65001)), \
354 [System.Text.Encoding]::GetEncoding(28605))
355!ENDIF
356
357tutor1.ru tutor2.ru :
358!IF DEFINED (ICONV)
359 $(ICONV) -f UTF-8 -t KOI8-R $@.utf-8 >$@
360!ELSE
361 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
362 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000363 [System.Text.Encoding]::GetEncoding(65001)), \
364 [System.Text.Encoding]::GetEncoding(20866))
365!ENDIF
366
RestorerZ12e17292024-12-02 20:13:52 +0100367tutor1.ru.cp1251 tutor2.ru.cp1251 :
Restorer64c6bfd2023-11-26 14:01:56 +0000368!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100369 $(ICONV) -f UTF-8 -t CP1251 $(@R).utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000370!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300371 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
RestorerZ12e17292024-12-02 20:13:52 +0100372 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000373 [System.Text.Encoding]::GetEncoding(65001)), \
374 [System.Text.Encoding]::GetEncoding(1251))
375!ENDIF
376
RestorerZ12e17292024-12-02 20:13:52 +0100377tutor1.sk tutor2.sk :
Restorer64c6bfd2023-11-26 14:01:56 +0000378!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100379 $(ICONV) -f UTF-8 -t ISO-8859-2 $@.utf-8 >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000380!ELSE
RestorerZ12e17292024-12-02 20:13:52 +0100381 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
382 [System.IO.File]::ReadAllText(\"$@.utf-8\", \
383 [System.Text.Encoding]::GetEncoding(65001)), \
384 [System.Text.Encoding]::GetEncoding(28592))
Restorer64c6bfd2023-11-26 14:01:56 +0000385!ENDIF
386
RestorerZ12e17292024-12-02 20:13:52 +0100387tutor1.sk.cp1250 tutor2.sk.cp1250 :
Restorer64c6bfd2023-11-26 14:01:56 +0000388!IF DEFINED (ICONV)
RestorerZ12e17292024-12-02 20:13:52 +0100389 $(ICONV) -f UTF-8 -t CP1250 $(@R).utf-8 >$@
390!ELSE
391 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
392 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
393 [System.Text.Encoding]::GetEncoding(65001)), \
394 [System.Text.Encoding]::GetEncoding(1252))
395!ENDIF
396
397tutor1.sr.cp1250 tutor2.sr.cp1250 :
398!IF DEFINED (ICONV)
399 $(ICONV) -f UTF-8 -t CP1250 $(@R).utf-8 >$@
400!ELSE
401 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
402 [System.IO.File]::ReadAllText(\"$(@R).utf-8\", \
403 [System.Text.Encoding]::GetEncoding(65001)), \
404 [System.Text.Encoding]::GetEncoding(1252))
405!ENDIF
406
407tutor1.sv.utf-8 : tutor1.sv
408!IF DEFINED (ICONV)
409 $(ICONV) -f ISO-8859-15 -t UTF-8 $? >$@
410!ELSE
411 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
412 [System.Text.Encoding]::GetEncoding(28605)) ^| \
413 1>nul New-Item -Path . -Name $@ -ItemType file -Force
414!ENDIF
415
416tutor2.sv : tutor2.sv.utf-8
417!IF DEFINED (ICONV)
418 $(ICONV) -f UTF-8 -t ISO-8859-15 $? >$@
Restorer64c6bfd2023-11-26 14:01:56 +0000419!ELSE
Restorer91155eb2024-01-22 22:25:43 +0300420 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000421 [System.IO.File]::ReadAllText(\"$?\", \
422 [System.Text.Encoding]::GetEncoding(65001)), \
RestorerZ12e17292024-12-02 20:13:52 +0100423 [System.Text.Encoding]::GetEncoding(28605))
424!ENDIF
425
426tutor1.tr.iso9 tutor2.tr.iso9 :
427!IF DEFINED (ICONV)
428 $(ICONV) -f UTF-8 -t ISO-8859-9 $*.utf-8 >$@
429!ELSE
430 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
431 [System.IO.File]::ReadAllText(\"$*.utf-8\", \
432 [System.Text.Encoding]::GetEncoding(65001)), \
Restorer64c6bfd2023-11-26 14:01:56 +0000433 [System.Text.Encoding]::GetEncoding(28599))
434!ENDIF
435
RestorerZ12e17292024-12-02 20:13:52 +0100436tutor1.zh.utf-8 : tutor1.zh.big5
Restorer91155eb2024-01-22 22:25:43 +0300437 $(PS) $(PSFLAGS) [System.IO.File]::ReadAllText(\"$?\", \
Restorer64c6bfd2023-11-26 14:01:56 +0000438 [System.Text.Encoding]::GetEncoding(950)) ^| \
RestorerZ12e17292024-12-02 20:13:52 +0100439 1>nul New-Item -Path . -Name $@ -ItemType file -Force
440
441tutor2.zh.big5 : tutor2.zh.utf-8
442 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
443 [System.IO.File]::ReadAllText(\"$?\", \
444 [System.Text.Encoding]::GetEncoding(65001)), \
445 [System.Text.Encoding]::GetEncoding(950))
Restorer64c6bfd2023-11-26 14:01:56 +0000446
Restorer91155eb2024-01-22 22:25:43 +0300447clean :
RestorerZ12e17292024-12-02 20:13:52 +0100448 @for %%G in ($(CONVERTED)) do (if exist .\%%G $(RM) .\%%G)
Restorer64c6bfd2023-11-26 14:01:56 +0000449
450# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make: