Mercurial > vim
annotate src/po/Makefile @ 2455:9367de3e2e1b vim73
Fix: crash in spell checking with a 0x300 character.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 01 Aug 2010 15:37:02 +0200 |
parents | 3259c3923c1e |
children | 4aa73aa648bc |
rev | line source |
---|---|
7 | 1 # Makefile for the Vim message translations. |
2 | |
3 # TODO make this configurable | |
4 # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are | |
5 # not installed on Unix | |
6 | |
434 | 7 LANGUAGES = \ |
8 af \ | |
9 ca \ | |
10 cs \ | |
11 de \ | |
12 en_GB \ | |
1620 | 13 eo \ |
434 | 14 es \ |
1620 | 15 fi \ |
434 | 16 fr \ |
17 ga \ | |
18 it \ | |
19 ja \ | |
20 ko \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
21 ko.UTF-8 \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
22 nb \ |
434 | 23 no \ |
24 pl \ | |
1698 | 25 pt_BR \ |
434 | 26 ru \ |
27 sk \ | |
28 sv \ | |
29 uk \ | |
30 vi \ | |
31 zh_CN \ | |
32 zh_CN.UTF-8 \ | |
33 zh_TW \ | |
492 | 34 zh_TW.UTF-8 |
434 | 35 |
36 MOFILES = \ | |
37 af.mo \ | |
38 ca.mo \ | |
39 cs.mo \ | |
40 de.mo \ | |
41 en_GB.mo \ | |
1620 | 42 eo.mo \ |
434 | 43 es.mo \ |
1620 | 44 fi.mo \ |
434 | 45 fr.mo \ |
46 ga.mo \ | |
47 it.mo \ | |
48 ja.mo \ | |
49 ko.mo \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
50 ko.UTF-8.mo \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
51 nb.mo \ |
434 | 52 no.mo \ |
53 pl.mo \ | |
1698 | 54 pt_BR.mo \ |
434 | 55 ru.mo \ |
56 sk.mo \ | |
57 sv.mo \ | |
58 uk.mo \ | |
59 vi.mo \ | |
60 zh_CN.UTF-8.mo \ | |
61 zh_CN.mo \ | |
62 zh_TW.UTF-8.mo \ | |
492 | 63 zh_TW.mo |
7 | 64 |
440 | 65 CONVERTED = \ |
66 cs.cp1250.mo \ | |
67 ja.sjis.mo \ | |
68 pl.cp1250.mo \ | |
819 | 69 pl.UTF-8.mo \ |
440 | 70 ru.cp1251.mo \ |
71 sk.cp1250.mo \ | |
72 uk.cp1251.mo \ | |
492 | 73 zh_CN.cp936.mo |
440 | 74 |
75 CHECKFILES = \ | |
76 af.ck \ | |
77 ca.ck \ | |
78 cs.ck \ | |
79 de.ck \ | |
80 en_GB.ck \ | |
1620 | 81 eo.ck \ |
440 | 82 es.ck \ |
1620 | 83 fi.ck \ |
440 | 84 fr.ck \ |
85 ga.ck \ | |
86 it.ck \ | |
87 ja.ck \ | |
88 ko.ck \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
89 ko.UTF-8.ck \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
90 nb.ck \ |
440 | 91 no.ck \ |
92 pl.ck \ | |
1698 | 93 pt_BR.ck \ |
440 | 94 ru.ck \ |
95 sk.ck \ | |
96 sv.ck \ | |
97 uk.ck \ | |
98 vi.ck \ | |
99 zh_CN.UTF-8.ck \ | |
100 zh_CN.ck \ | |
101 zh_TW.UTF-8.ck \ | |
102 zh_TW.ck \ | |
103 cs.cp1250.ck \ | |
104 ja.sjis.ck \ | |
105 pl.cp1250.ck \ | |
819 | 106 pl.UTF-8.ck \ |
440 | 107 ru.cp1251.ck \ |
108 sk.cp1250.ck \ | |
109 uk.cp1251.ck \ | |
492 | 110 zh_CN.cp936.ck |
440 | 111 |
7 | 112 PACKAGE = vim |
113 SHELL = /bin/sh | |
440 | 114 VIM = ../vim |
7 | 115 |
116 # The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext | |
117 # tools 0.10.37, which use a slightly different .po file format that is not | |
118 # compatible with Solaris (and old gettext implementations) unless these are | |
119 # set. gettext 0.10.36 will not work! | |
120 MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -v | |
121 XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext | |
122 MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge | |
123 | |
124 .SUFFIXES: | |
440 | 125 .SUFFIXES: .po .mo .pot .ck |
1698 | 126 .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) |
7 | 127 |
128 .po.mo: | |
129 $(MSGFMT) -o $@ $< | |
130 | |
440 | 131 .po.ck: |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
132 $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< |
440 | 133 touch $@ |
134 | |
7 | 135 all: $(MOFILES) |
136 | |
440 | 137 check: $(CHECKFILES) |
138 | |
7 | 139 install: $(MOFILES) |
440 | 140 @$(MAKE) prefixcheck |
7 | 141 for lang in $(LANGUAGES); do \ |
142 dir=$(LOCALEDIR)/$$lang/; \ | |
143 if test ! -x "$$dir"; then \ | |
144 mkdir $$dir; chmod 755 $$dir; \ | |
145 fi; \ | |
146 dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \ | |
147 if test ! -x "$$dir"; then \ | |
148 mkdir $$dir; chmod 755 $$dir; \ | |
149 fi; \ | |
150 if test -r $$lang.mo; then \ | |
151 $(INSTALL_DATA) $$lang.mo $$dir/$(PACKAGE).mo; \ | |
152 chmod $(FILEMOD) $$dir/$(PACKAGE).mo; \ | |
153 fi; \ | |
154 done | |
155 | |
156 uninstall: | |
440 | 157 @$(MAKE) prefixcheck |
7 | 158 for cat in $(MOFILES); do \ |
159 cat=`basename $$cat`; \ | |
160 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ | |
161 rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ | |
162 done | |
163 | |
440 | 164 converted: $(CONVERTED) |
7 | 165 |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
166 # Norwegian/Bokmal: "nb" is an alias for "no". |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
167 # 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
|
168 # this work. |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
169 nb.po: no.po |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
170 cp no.po nb.po |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
171 |
7 | 172 # Convert ja.po to create ja.sjis.po. Requires doubling backslashes in the |
173 # second byte. Don't depend on sjiscorr, it should only be compiled when | |
174 # ja.sjis.po is outdated. | |
175 ja.sjis.po: ja.po | |
176 @$(MAKE) sjiscorr | |
177 rm -f ja.sjis.po | |
178 iconv -f euc-jp -t cp932 ja.po | ./sjiscorr > ja.sjis.po | |
179 | |
180 sjiscorr: sjiscorr.c | |
181 $(CC) -o sjiscorr sjiscorr.c | |
182 | |
183 # Convert cs.po to create cs.cp1250.po. | |
184 cs.cp1250.po: cs.po | |
185 rm -f cs.cp1250.po | |
186 iconv -f iso-8859-2 -t cp1250 cs.po | \ | |
187 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' > cs.cp1250.po | |
188 | |
189 # Convert pl.po to create pl.cp1250.po. | |
190 pl.cp1250.po: pl.po | |
191 rm -f pl.cp1250.po | |
192 iconv -f iso-8859-2 -t cp1250 pl.po | \ | |
193 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.cp1250.po | |
194 | |
819 | 195 # Convert pl.po to create pl.UTF-8.po. |
196 pl.UTF-8.po: pl.po | |
197 rm -f pl.UTF-8.po | |
198 iconv -f iso-8859-2 -t utf-8 pl.po | \ | |
199 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 | |
200 | |
7 | 201 # Convert sk.po to create sk.cp1250.po. |
202 sk.cp1250.po: sk.po | |
203 rm -f sk.cp1250.po | |
204 iconv -f iso-8859-2 -t cp1250 sk.po | \ | |
205 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' > sk.cp1250.po | |
206 | |
207 # Convert zh_CN.po to create zh_CN.cp936.po. | |
208 # set 'charset' to gbk to avoid that msfmt generates a warning | |
209 zh_CN.cp936.po: zh_CN.po | |
210 rm -f zh_CN.cp936.po | |
211 iconv -f gb2312 -t cp936 zh_CN.po | \ | |
212 sed -e 's/charset=gb2312/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.po, DO NOT EDIT/' > zh_CN.cp936.po | |
213 | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
214 # Convert ko.UTF-8.po to create ko.po. |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
215 ko.po: ko.UTF-8.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
216 rm -f ko.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
217 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
|
218 sed -e 's/charset=UTF-8/charset=euc-kr/' \ |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
219 -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
|
220 > ko.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
221 |
7 | 222 # Convert ru.po to create ru.cp1251.po. |
223 ru.cp1251.po: ru.po | |
224 rm -f ru.cp1251.po | |
9 | 225 iconv -f utf-8 -t cp1251 ru.po | \ |
226 sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po | |
7 | 227 |
23 | 228 # Convert uk.po to create uk.cp1251.po. |
229 uk.cp1251.po: uk.po | |
230 rm -f uk.cp1251.po | |
1620 | 231 iconv -f utf-8 -t cp1251 uk.po | \ |
232 sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' > uk.cp1251.po | |
23 | 233 |
440 | 234 prefixcheck: |
7 | 235 @if test "x" = "x$(prefix)"; then \ |
236 echo "******************************************"; \ | |
237 echo " please use make from the src directory "; \ | |
238 echo "******************************************"; \ | |
239 exit 1; \ | |
240 fi | |
241 | |
628 | 242 clean: checkclean |
243 rm -f core core.* *.old.po *.mo *.pot sjiscorr | |
7 | 244 |
245 distclean: clean | |
246 | |
628 | 247 checkclean: |
248 rm -f *.ck | |
249 | |
7 | 250 # |
251 # NOTE: If you get an error for gvimext.cpp not found, you need to unpack the | |
252 # extra archive. | |
253 # | |
254 $(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h | |
255 cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \ | |
256 --add-comments --keyword=_ --keyword=N_ \ | |
257 *.c if_perl.xs GvimExt/gvimext.cpp globals.h | |
258 mv -f ../$(PACKAGE).po $(PACKAGE).pot | |
259 | |
1698 | 260 update-po: $(LANGUAGES) |
261 | |
7 | 262 # Don't add a dependency here, we only want to update the .po files manually |
263 $(LANGUAGES): | |
264 @$(MAKE) $(PACKAGE).pot | |
265 if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi | |
266 mv $@.po $@.po.old | |
267 if $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po; then \ | |
268 rm -f $@.po.old; \ | |
269 else \ | |
270 echo "msgmerge for $@.po failed!"; mv $@.po.old $@.po; \ | |
271 fi |