blob: 15258f48ce5c9aa99d35169b897ecde45aed038a [file] [log] [blame]
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00001# Makefile for the Vim message translations for Cygwin
2# by Tony Mechelynck <antoine.mechelynck@skynet.be>
3# after Make_ming.mak by
4# Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
5#
6# Read the README_ming.txt file before using it.
7#
8# Use at your own risk but with care, it could even kill your canary.
9#
10
11ifndef VIMRUNTIME
12VIMRUNTIME = ../../runtime
13endif
14
Bram Moolenaara3ffd9c2005-07-21 21:03:15 +000015LANGUAGES = af \
16 ca \
17 cs \
18 cs.cp1250 \
19 de \
20 en_GB \
21 es \
22 fr \
23 ga \
24 it \
25 ja \
26 ja.sjis \
27 ko \
28 no \
29 pl \
30 pl.cp1250 \
31 ru \
32 ru.cp1251 \
33 sk \
34 sk.cp1250 \
35 sv \
36 uk \
37 uk.cp1251 \
38 vi \
39 zh_CN \
40 zh_CN.UTF-8 \
41 zh_CN.cp936 \
42 zh_TW \
43 zh_TW.UTF-8 \
44
45MOFILES = af.mo \
46 ca.mo \
47 cs.cp1250.mo \
48 cs.mo \
49 de.mo \
50 en_GB.mo \
51 es.mo \
52 fr.mo \
53 ga.mo \
54 it.mo \
55 ja.mo \
56 ja.sjis.mo \
57 ko.mo \
58 no.mo \
59 pl.cp1250.mo \
60 pl.mo \
61 ru.cp1251.mo \
62 ru.mo \
63 sk.cp1250.mo \
64 sk.mo \
65 sv.mo \
66 uk.cp1251.mo \
67 uk.mo \
68 vi.mo \
69 zh_CN.UTF-8.mo \
70 zh_CN.cp936.mo \
71 zh_CN.mo \
72 zh_TW.UTF-8.mo \
73 zh_TW.mo \
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000074
75PACKAGE = vim
76
77# Uncomment one of the lines below or modify it to put the path to your
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000078# gettext binaries
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000079ifndef GETTEXT_PATH
80#GETTEXT_PATH = C:/gettext.win32/bin/
81#GETTEXT_PATH = C:/gettext-0.10.35-w32/win32/Release/
82GETTEXT_PATH = /bin/
83endif
84
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000085# The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext
86# tools 0.10.37, which use a slightly different .po file format that is not
87# compatible with Solaris (and old gettext implementations) unless these are
88# set. gettext 0.10.36 will not work!
89MSGFMT = OLD_PO_FILE_INPUT=yes $(GETTEXT_PATH)msgfmt -v
90XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes $(GETTEXT_PATH)xgettext
91MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes $(GETTEXT_PATH)msgmerge
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000092
93# MV = move
94# CP = copy
95# RM = del
96# MKD = mkdir
97MV = mv -f
98CP = cp -f
99RM = rm -f
100MKD = mkdir -p
101
102.SUFFIXES:
103.SUFFIXES: .po .mo .pot
104.PHONY: first_time all install clean $(LANGUAGES)
105
106.po.mo:
107 $(MSGFMT) -o $@ $<
108
109all: $(MOFILES)
110
111first_time:
112 $(XGETTEXT) --default-domain=$(LANGUAGE) \
113 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
114
115$(LANGUAGES):
116 $(XGETTEXT) --default-domain=$(PACKAGE) \
117 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
118 $(MV) $(PACKAGE).po $(PACKAGE).pot
119 $(CP) $@.po $@.po.orig
120 $(MV) $@.po $@.po.old
121 $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
122 $(RM) $@.po.old
123
124install: $(MOFILES)
125 for TARGET in $(LANGUAGES); do \
126 $(MKD) $(VIMRUNTIME)/lang/$$TARGET/LC_MESSAGES ; \
127 $(CP) $$TARGET.mo $(VIMRUNTIME)/lang/$$TARGET/LC_MESSAGES/$(PACKAGE).mo ; \
128 done
129
130clean:
131 $(RM) *.mo
132 $(RM) *.pot
133
134