Mercurial > vim
annotate src/po/Makefile @ 13382:7cc66cd50eb3 v8.0.1565
patch 8.0.1565: can't build Mac version without GUI
commit https://github.com/vim/vim/commit/107279c17b3a21899e0a9d0293ada040216539ba
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 4 18:57:19 2018 +0100
patch 8.0.1565: can't build Mac version without GUI
Problem: Can't build Mac version without GUI.
Solution: Adjust when IME_WITHOUT_XIM is defined.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 04 Mar 2018 19:00:07 +0100 |
parents | acd7eaa13d2b |
children | cf04dbb33f41 |
rev | line source |
---|---|
7 | 1 # Makefile for the Vim message translations. |
2 | |
5962 | 3 # Include stuff found by configure. |
4 include ../auto/config.mk | |
5 | |
7 | 6 # TODO make this configurable |
7 # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are | |
8 # not installed on Unix | |
9 | |
434 | 10 LANGUAGES = \ |
11 af \ | |
12 ca \ | |
13 cs \ | |
14 de \ | |
15 en_GB \ | |
1620 | 16 eo \ |
434 | 17 es \ |
1620 | 18 fi \ |
434 | 19 fr \ |
20 ga \ | |
21 it \ | |
22 ja \ | |
23 ko \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
24 ko.UTF-8 \ |
12559 | 25 lv \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
26 nb \ |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2505
diff
changeset
|
27 nl \ |
434 | 28 no \ |
29 pl \ | |
1698 | 30 pt_BR \ |
434 | 31 ru \ |
32 sk \ | |
13341
acd7eaa13d2b
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
12559
diff
changeset
|
33 sr \ |
434 | 34 sv \ |
35 uk \ | |
36 vi \ | |
37 zh_CN \ | |
38 zh_CN.UTF-8 \ | |
39 zh_TW \ | |
492 | 40 zh_TW.UTF-8 |
434 | 41 |
4019 | 42 CONVERTED = \ |
43 cs.cp1250 \ | |
44 ja.sjis \ | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
45 ja.euc-jp \ |
4019 | 46 pl.cp1250 \ |
47 pl.UTF-8 \ | |
48 ru.cp1251 \ | |
49 sk.cp1250 \ | |
50 uk.cp1251 \ | |
51 zh_CN.cp936 | |
52 | |
434 | 53 MOFILES = \ |
54 af.mo \ | |
55 ca.mo \ | |
56 cs.mo \ | |
57 de.mo \ | |
58 en_GB.mo \ | |
1620 | 59 eo.mo \ |
434 | 60 es.mo \ |
1620 | 61 fi.mo \ |
434 | 62 fr.mo \ |
63 ga.mo \ | |
64 it.mo \ | |
65 ja.mo \ | |
66 ko.mo \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
67 ko.UTF-8.mo \ |
12559 | 68 lv.mo \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
69 nb.mo \ |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2505
diff
changeset
|
70 nl.mo \ |
434 | 71 no.mo \ |
72 pl.mo \ | |
1698 | 73 pt_BR.mo \ |
434 | 74 ru.mo \ |
75 sk.mo \ | |
13341
acd7eaa13d2b
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
12559
diff
changeset
|
76 sr.mo \ |
434 | 77 sv.mo \ |
78 uk.mo \ | |
79 vi.mo \ | |
80 zh_CN.UTF-8.mo \ | |
81 zh_CN.mo \ | |
82 zh_TW.UTF-8.mo \ | |
492 | 83 zh_TW.mo |
7 | 84 |
4019 | 85 MOCONVERTED = \ |
440 | 86 cs.cp1250.mo \ |
87 ja.sjis.mo \ | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
88 ja.euc-jp.mo \ |
440 | 89 pl.cp1250.mo \ |
819 | 90 pl.UTF-8.mo \ |
440 | 91 ru.cp1251.mo \ |
92 sk.cp1250.mo \ | |
93 uk.cp1251.mo \ | |
492 | 94 zh_CN.cp936.mo |
440 | 95 |
96 CHECKFILES = \ | |
97 af.ck \ | |
98 ca.ck \ | |
99 cs.ck \ | |
100 de.ck \ | |
101 en_GB.ck \ | |
1620 | 102 eo.ck \ |
440 | 103 es.ck \ |
1620 | 104 fi.ck \ |
440 | 105 fr.ck \ |
106 ga.ck \ | |
107 it.ck \ | |
108 ja.ck \ | |
109 ko.ck \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
110 ko.UTF-8.ck \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
111 nb.ck \ |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2505
diff
changeset
|
112 nl.ck \ |
440 | 113 no.ck \ |
114 pl.ck \ | |
1698 | 115 pt_BR.ck \ |
440 | 116 ru.ck \ |
117 sk.ck \ | |
13341
acd7eaa13d2b
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
12559
diff
changeset
|
118 sr.ck \ |
440 | 119 sv.ck \ |
120 uk.ck \ | |
121 vi.ck \ | |
122 zh_CN.UTF-8.ck \ | |
123 zh_CN.ck \ | |
124 zh_TW.UTF-8.ck \ | |
125 zh_TW.ck \ | |
126 cs.cp1250.ck \ | |
127 ja.sjis.ck \ | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
128 ja.euc-jp.ck \ |
440 | 129 pl.cp1250.ck \ |
819 | 130 pl.UTF-8.ck \ |
440 | 131 ru.cp1251.ck \ |
132 sk.cp1250.ck \ | |
133 uk.cp1251.ck \ | |
492 | 134 zh_CN.cp936.ck |
440 | 135 |
7 | 136 PACKAGE = vim |
137 SHELL = /bin/sh | |
440 | 138 VIM = ../vim |
7 | 139 |
140 # The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext | |
141 # tools 0.10.37, which use a slightly different .po file format that is not | |
142 # compatible with Solaris (and old gettext implementations) unless these are | |
143 # set. gettext 0.10.36 will not work! | |
5962 | 144 MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMT) -v |
7 | 145 XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext |
146 MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge | |
147 | |
148 .SUFFIXES: | |
440 | 149 .SUFFIXES: .po .mo .pot .ck |
4019 | 150 .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED) |
7 | 151 |
152 .po.mo: | |
5962 | 153 $(MSGFMTCMD) -o $@ $< |
7 | 154 |
440 | 155 .po.ck: |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
156 $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< |
440 | 157 touch $@ |
158 | |
4019 | 159 all: $(MOFILES) $(MOCONVERTED) |
7 | 160 |
440 | 161 check: $(CHECKFILES) |
162 | |
4019 | 163 install: $(MOFILES) $(MOCONVERTED) |
440 | 164 @$(MAKE) prefixcheck |
4019 | 165 for lang in $(LANGUAGES) $(CONVERTED); do \ |
7 | 166 dir=$(LOCALEDIR)/$$lang/; \ |
167 if test ! -x "$$dir"; then \ | |
168 mkdir $$dir; chmod 755 $$dir; \ | |
169 fi; \ | |
170 dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \ | |
171 if test ! -x "$$dir"; then \ | |
172 mkdir $$dir; chmod 755 $$dir; \ | |
173 fi; \ | |
174 if test -r $$lang.mo; then \ | |
175 $(INSTALL_DATA) $$lang.mo $$dir/$(PACKAGE).mo; \ | |
176 chmod $(FILEMOD) $$dir/$(PACKAGE).mo; \ | |
177 fi; \ | |
178 done | |
179 | |
180 uninstall: | |
440 | 181 @$(MAKE) prefixcheck |
4019 | 182 for cat in $(MOFILES) $(MOCONVERTED); do \ |
7 | 183 cat=`basename $$cat`; \ |
184 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ | |
185 rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ | |
186 done | |
187 | |
4019 | 188 converted: $(MOCONVERTED) |
7 | 189 |
4340 | 190 # nl.po was added later, if it does not exist use a file with just a # in it |
191 # (an empty file doesn't work with old msgfmt). | |
4067 | 192 nl.po: |
4340 | 193 @( echo \# > nl.po ) |
4067 | 194 |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
195 # Norwegian/Bokmal: "nb" is an alias for "no". |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
196 # Copying the file is not efficient, but I don't know of another way to make |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
197 # this work. |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
198 nb.po: no.po |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
199 cp no.po nb.po |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
200 |
7 | 201 # Convert ja.po to create ja.sjis.po. Requires doubling backslashes in the |
202 # second byte. Don't depend on sjiscorr, it should only be compiled when | |
203 # ja.sjis.po is outdated. | |
204 ja.sjis.po: ja.po | |
205 @$(MAKE) sjiscorr | |
206 rm -f ja.sjis.po | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
207 iconv -f utf-8 -t cp932 ja.po | ./sjiscorr > ja.sjis.po |
7 | 208 |
209 sjiscorr: sjiscorr.c | |
210 $(CC) -o sjiscorr sjiscorr.c | |
211 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
212 ja.euc-jp.po: ja.po |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
213 iconv -f utf-8 -t euc-jp ja.po | \ |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
214 sed -e 's/charset=utf-8/charset=euc-jp/' -e 's/# Original translations/# Generated from ja.po, DO NOT EDIT/' > ja.euc-jp.po |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4340
diff
changeset
|
215 |
7 | 216 # Convert cs.po to create cs.cp1250.po. |
217 cs.cp1250.po: cs.po | |
218 rm -f cs.cp1250.po | |
219 iconv -f iso-8859-2 -t cp1250 cs.po | \ | |
220 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' > cs.cp1250.po | |
221 | |
222 # Convert pl.po to create pl.cp1250.po. | |
223 pl.cp1250.po: pl.po | |
224 rm -f pl.cp1250.po | |
225 iconv -f iso-8859-2 -t cp1250 pl.po | \ | |
226 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.cp1250.po | |
227 | |
819 | 228 # Convert pl.po to create pl.UTF-8.po. |
229 pl.UTF-8.po: pl.po | |
230 rm -f pl.UTF-8.po | |
231 iconv -f iso-8859-2 -t utf-8 pl.po | \ | |
232 sed -e 's/charset=ISO-8859-2/charset=utf-8/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.UTF-8.po | |
233 | |
7 | 234 # Convert sk.po to create sk.cp1250.po. |
235 sk.cp1250.po: sk.po | |
236 rm -f sk.cp1250.po | |
237 iconv -f iso-8859-2 -t cp1250 sk.po | \ | |
238 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' > sk.cp1250.po | |
239 | |
10710
4aa22b40321f
patch 8.0.0245: zh_CN.cp936.po has a conversion error
Christian Brabandt <cb@256bit.org>
parents:
5962
diff
changeset
|
240 # Convert zh_CN.UTF-8.po to create zh_CN.cp936.po. |
4aa22b40321f
patch 8.0.0245: zh_CN.cp936.po has a conversion error
Christian Brabandt <cb@256bit.org>
parents:
5962
diff
changeset
|
241 # Set 'charset' to gbk to avoid that msfmt generates a warning. |
4aa22b40321f
patch 8.0.0245: zh_CN.cp936.po has a conversion error
Christian Brabandt <cb@256bit.org>
parents:
5962
diff
changeset
|
242 # This used to convert from zh_CN.po, but that results in a conversion error. |
4aa22b40321f
patch 8.0.0245: zh_CN.cp936.po has a conversion error
Christian Brabandt <cb@256bit.org>
parents:
5962
diff
changeset
|
243 zh_CN.cp936.po: zh_CN.UTF-8.po |
7 | 244 rm -f zh_CN.cp936.po |
10710
4aa22b40321f
patch 8.0.0245: zh_CN.cp936.po has a conversion error
Christian Brabandt <cb@256bit.org>
parents:
5962
diff
changeset
|
245 iconv -f UTF-8 -t cp936 zh_CN.UTF-8.po | \ |
11659
49c12c93abf3
Updated runtime files and translations.
Christian Brabandt <cb@256bit.org>
parents:
10710
diff
changeset
|
246 sed -e 's/charset=utf-8/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.UTF-8.po, DO NOT EDIT/' > zh_CN.cp936.po |
7 | 247 |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
248 # Convert ko.UTF-8.po to create ko.po. |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
249 ko.po: ko.UTF-8.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
250 rm -f ko.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
251 iconv -f UTF-8 -t euc-kr ko.UTF-8.po | \ |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
252 sed -e 's/charset=UTF-8/charset=euc-kr/' \ |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
253 -e 's/# Korean translation for Vim/# Generated from ko.UTF-8.po, DO NOT EDIT/' \ |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
254 > ko.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
255 |
7 | 256 # Convert ru.po to create ru.cp1251.po. |
257 ru.cp1251.po: ru.po | |
258 rm -f ru.cp1251.po | |
9 | 259 iconv -f utf-8 -t cp1251 ru.po | \ |
260 sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po | |
7 | 261 |
23 | 262 # Convert uk.po to create uk.cp1251.po. |
263 uk.cp1251.po: uk.po | |
264 rm -f uk.cp1251.po | |
1620 | 265 iconv -f utf-8 -t cp1251 uk.po | \ |
266 sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' > uk.cp1251.po | |
23 | 267 |
440 | 268 prefixcheck: |
7 | 269 @if test "x" = "x$(prefix)"; then \ |
270 echo "******************************************"; \ | |
271 echo " please use make from the src directory "; \ | |
272 echo "******************************************"; \ | |
273 exit 1; \ | |
274 fi | |
275 | |
628 | 276 clean: checkclean |
277 rm -f core core.* *.old.po *.mo *.pot sjiscorr | |
7 | 278 |
279 distclean: clean | |
280 | |
628 | 281 checkclean: |
282 rm -f *.ck | |
283 | |
2505
4aa73aa648bc
Some messages were missing when updating translations. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2098
diff
changeset
|
284 $(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h |
7 | 285 cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \ |
286 --add-comments --keyword=_ --keyword=N_ \ | |
2505
4aa73aa648bc
Some messages were missing when updating translations. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2098
diff
changeset
|
287 *.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h |
7 | 288 mv -f ../$(PACKAGE).po $(PACKAGE).pot |
289 | |
1698 | 290 update-po: $(LANGUAGES) |
291 | |
7 | 292 # Don't add a dependency here, we only want to update the .po files manually |
293 $(LANGUAGES): | |
294 @$(MAKE) $(PACKAGE).pot | |
295 if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi | |
296 mv $@.po $@.po.old | |
297 if $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po; then \ | |
298 rm -f $@.po.old; \ | |
299 else \ | |
300 echo "msgmerge for $@.po failed!"; mv $@.po.old $@.po; \ | |
301 fi |