blob: 810efb036db31055a5e743679e5d4f8a0c45a3b5 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001# 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 = af ca cs de en_GB es fr it ja ko no pl ru sk sv uk zh_TW \
14 zh_TW.UTF-8 zh_CN zh_CN.UTF-8
15MOFILES = af.mo ca.mo cs.mo de.mo en_GB.mo es.mo fr.mo it.mo ja.mo \
16 ko.mo no.mo pl.mo ru.mo sk.mo sv.mo uk.mo \
17 zh_TW.mo zh_TW.UTF-8.mo zh_CN.mo zh_CN.UTF-8.mo
18
19PACKAGE = vim
20
21# Uncomment one of the lines below or modify it to put the path to your
22# gettex binaries; I use the first
23#GETTEXT_PATH = C:/gettext.win32/bin/
24#GETTEXT_PATH = C:/gettext-0.10.35-w32/win32/Release/
25#GETTEXT_PATH = C:/cygwin/bin/
26
27MSGFMT = $(GETTEXT_PATH)msgfmt
28XGETTEXT = $(GETTEXT_PATH)xgettext
29MSGMERGE = $(GETTEXT_PATH)msgmerge
30
31MV = move
32CP = copy
33RM = del
34MKD = mkdir
35
36.SUFFIXES:
37.SUFFIXES: .po .mo .pot
38.PHONY: first_time all install clean $(LANGUAGES)
39
40.po.mo:
41 $(MSGFMT) -o $@ $<
42
43all: $(MOFILES)
44
45first_time:
46 $(XGETTEXT) --default-domain=$(LANGUAGE) \
47 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
48
49$(LANGUAGES):
50 $(XGETTEXT) --default-domain=$(PACKAGE) \
51 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
52 $(MV) $(PACKAGE).po $(PACKAGE).pot
53 $(CP) $@.po $@.po.orig
54 $(MV) $@.po $@.po.old
55 $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
56 $(RM) $@.po.old
57
58install:
59 $(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE)
60 $(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
61 $(CP) $(LANGUAGE).mo $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES\$(PACKAGE).mo
62
63clean:
64 $(RM) *.mo
65 $(RM) *.pot
66
67