1# Makefile for the Vim message translations for mingw32
2#
3# Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
4#
5# Read the README_ming.txt file before using it.
6#
7# Use at your own risk but with care, it could even kill your canary.
8#
9# Previous to all you must have the environment variable LANGUAGE set to your
10# language (xx) and add it to the next three lines.
11#
12
13LANGUAGES = \
14		af \
15		ca \
16		cs \
17		de \
18		en_GB \
19		eo \
20		es \
21		fi \
22		fr \
23		ga \
24		it \
25		ja \
26		ko \
27		no \
28		pl \
29		pt_BR \
30		ru \
31		sk \
32		sv \
33		uk \
34		vi \
35		zh_CN \
36		zh_CN.UTF-8\
37		zh_TW \
38		zh_TW.UTF-8 \
39
40MOFILES = \
41		af.mo \
42		ca.mo \
43		cs.mo \
44		de.mo \
45		en_GB.mo \
46		eo.mo \
47		es.mo \
48		fi.mo \
49		fr.mo \
50		ga.mo \
51		it.mo \
52		ja.mo \
53		ko.mo \
54		no.mo \
55		pl.mo \
56		pt_BR.mo \
57		ru.mo \
58		sk.mo \
59		sv.mo \
60		uk.mo \
61		vi.mo \
62		zh_CN.UTF-8.mo \
63		zh_CN.mo \
64		zh_TW.UTF-8.mo \
65		zh_TW.mo \
66
67PACKAGE = vim
68
69# Uncomment one of the lines below or modify it to put the path to your
70# gettex binaries; I use the first
71#GETTEXT_PATH = C:/gettext.win32/bin/
72#GETTEXT_PATH = C:/gettext-0.10.35-w32/win32/Release/
73#GETTEXT_PATH = C:/cygwin/bin/
74
75MSGFMT = $(GETTEXT_PATH)msgfmt
76XGETTEXT = $(GETTEXT_PATH)xgettext
77MSGMERGE = $(GETTEXT_PATH)msgmerge
78
79MV = move
80CP = copy
81RM = del
82MKD = mkdir
83
84.SUFFIXES:
85.SUFFIXES: .po .mo .pot
86.PHONY: first_time all install clean $(LANGUAGES)
87
88.po.mo:
89	$(MSGFMT) -o $@ $<
90
91all: $(MOFILES)
92
93first_time:
94	$(XGETTEXT) --default-domain=$(LANGUAGE) \
95		--add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
96
97$(LANGUAGES):
98	$(XGETTEXT) --default-domain=$(PACKAGE) \
99		--add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
100	$(MV) $(PACKAGE).po $(PACKAGE).pot
101	$(CP) $@.po $@.po.orig
102	$(MV) $@.po $@.po.old
103	$(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
104	$(RM) $@.po.old
105
106install:
107	$(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE)
108	$(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
109	$(CP) $(LANGUAGE).mo $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES\$(PACKAGE).mo
110
111clean:
112	$(RM) *.mo
113	$(RM) *.pot
114
115
116