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