annotate src/po/Makefile @ 170:8c60f65311fa v7.0052

updated for version 7.0052
author vimboss
date Sat, 26 Feb 2005 23:04:13 +0000
parents c93c9cad9618
children 9595cf1d80a7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 # Makefile for the Vim message translations.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 # TODO make this configurable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 # not installed on Unix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
170
8c60f65311fa updated for version 7.0052
vimboss
parents: 167
diff changeset
7 LANGUAGES = af ca cs de en_GB es fr ga it ja ko no pl ru sk sv uk vi zh_TW \
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 zh_TW.UTF-8 zh_CN zh_CN.UTF-8
167
c93c9cad9618 updated for version 7.0051
vimboss
parents: 23
diff changeset
9 MOFILES = af.mo ca.mo cs.mo de.mo en_GB.mo es.mo fr.mo ga.mo it.mo ja.mo \
170
8c60f65311fa updated for version 7.0052
vimboss
parents: 167
diff changeset
10 ko.mo no.mo pl.mo ru.mo sk.mo sv.mo uk.mo vi.mo \
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 zh_TW.mo zh_TW.UTF-8.mo zh_CN.mo zh_CN.UTF-8.mo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 PACKAGE = vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 SHELL = /bin/sh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 # The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 # tools 0.10.37, which use a slightly different .po file format that is not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 # compatible with Solaris (and old gettext implementations) unless these are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 # set. gettext 0.10.36 will not work!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 .SUFFIXES:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 .SUFFIXES: .po .mo .pot
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 .PHONY: all install uninstall check clean distclean $(LANGUAGES)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 .po.mo:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 $(MSGFMT) -o $@ $<
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 all: $(MOFILES)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 install: $(MOFILES)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 @$(MAKE) check
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 for lang in $(LANGUAGES); do \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 dir=$(LOCALEDIR)/$$lang/; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 if test ! -x "$$dir"; then \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 mkdir $$dir; chmod 755 $$dir; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 fi; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 if test ! -x "$$dir"; then \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 mkdir $$dir; chmod 755 $$dir; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 fi; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 if test -r $$lang.mo; then \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 $(INSTALL_DATA) $$lang.mo $$dir/$(PACKAGE).mo; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 chmod $(FILEMOD) $$dir/$(PACKAGE).mo; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 fi; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 uninstall:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 @$(MAKE) check
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 for cat in $(MOFILES); do \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 cat=`basename $$cat`; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 converted: ja.sjis.mo cs.cp1250.mo pl.cp1250.mo sk.cp1250.mo zh_CN.cp936.mo \
23
3f44e9abe4ec updated for version 7.0015
vimboss
parents: 9
diff changeset
59 ru.cp1251.mo uk.cp1251.mo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 # Convert ja.po to create ja.sjis.po. Requires doubling backslashes in the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 # second byte. Don't depend on sjiscorr, it should only be compiled when
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 # ja.sjis.po is outdated.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 ja.sjis.po: ja.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 @$(MAKE) sjiscorr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 rm -f ja.sjis.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 iconv -f euc-jp -t cp932 ja.po | ./sjiscorr > ja.sjis.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 sjiscorr: sjiscorr.c
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 $(CC) -o sjiscorr sjiscorr.c
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 # Convert cs.po to create cs.cp1250.po.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 cs.cp1250.po: cs.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 rm -f cs.cp1250.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 iconv -f iso-8859-2 -t cp1250 cs.po | \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' > cs.cp1250.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 # Convert pl.po to create pl.cp1250.po.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 pl.cp1250.po: pl.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 rm -f pl.cp1250.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 iconv -f iso-8859-2 -t cp1250 pl.po | \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.cp1250.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 # Convert sk.po to create sk.cp1250.po.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 sk.cp1250.po: sk.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 rm -f sk.cp1250.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 iconv -f iso-8859-2 -t cp1250 sk.po | \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' > sk.cp1250.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 # Convert zh_CN.po to create zh_CN.cp936.po.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 # set 'charset' to gbk to avoid that msfmt generates a warning
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 zh_CN.cp936.po: zh_CN.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 rm -f zh_CN.cp936.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 iconv -f gb2312 -t cp936 zh_CN.po | \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 sed -e 's/charset=gb2312/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.po, DO NOT EDIT/' > zh_CN.cp936.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 # Convert ru.po to create ru.cp1251.po.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 ru.cp1251.po: ru.po
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 rm -f ru.cp1251.po
9
4102fb4ea781 updated for version 7.0002
vimboss
parents: 7
diff changeset
100 iconv -f utf-8 -t cp1251 ru.po | \
4102fb4ea781 updated for version 7.0002
vimboss
parents: 7
diff changeset
101 sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
23
3f44e9abe4ec updated for version 7.0015
vimboss
parents: 9
diff changeset
103 # Convert uk.po to create uk.cp1251.po.
3f44e9abe4ec updated for version 7.0015
vimboss
parents: 9
diff changeset
104 uk.cp1251.po: uk.po
3f44e9abe4ec updated for version 7.0015
vimboss
parents: 9
diff changeset
105 rm -f uk.cp1251.po
3f44e9abe4ec updated for version 7.0015
vimboss
parents: 9
diff changeset
106 iconv -f koi8-u -t cp1251 uk.po | \
3f44e9abe4ec updated for version 7.0015
vimboss
parents: 9
diff changeset
107 sed -e 's/charset=koi8-u/charset=cp1251/' -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' > uk.cp1251.po
3f44e9abe4ec updated for version 7.0015
vimboss
parents: 9
diff changeset
108
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 check:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 @if test "x" = "x$(prefix)"; then \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 echo "******************************************"; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 echo " please use make from the src directory "; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 echo "******************************************"; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 exit 1; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 fi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 clean:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 rm -f core core.* *.old.po *.mo *.pot sjiscorr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 distclean: clean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 # NOTE: If you get an error for gvimext.cpp not found, you need to unpack the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 # extra archive.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 $(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 --add-comments --keyword=_ --keyword=N_ \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 *.c if_perl.xs GvimExt/gvimext.cpp globals.h
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 mv -f ../$(PACKAGE).po $(PACKAGE).pot
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 # Don't add a dependency here, we only want to update the .po files manually
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 $(LANGUAGES):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 @$(MAKE) $(PACKAGE).pot
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 mv $@.po $@.po.old
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 if $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po; then \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 rm -f $@.po.old; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 else \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 echo "msgmerge for $@.po failed!"; mv $@.po.old $@.po; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 fi