blob: d8b507d3376fe9344336955ac2eee005bf2c0284 [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
15LANGUAGES = af ca cs de en_GB es fr ga it ja ko no pl ru sk sv uk vi zh_TW \
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000016 cs.cp1250 pl.cp1250 ru.cp1251 sk.cp1250 uk.cp1251 \
17 zh_TW.UTF-8 zh_CN zh_CN.cp936 zh_CN.UTF-8 ja.sjis
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000018MOFILES = af.mo ca.mo cs.mo de.mo en_GB.mo es.mo fr.mo ga.mo it.mo ja.mo \
19 ko.mo no.mo pl.mo ru.mo sk.mo sv.mo uk.mo vi.mo \
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000020 cs.cp1250.mo pl.cp1250.mo ru.cp1251.mo sk.cp1250.mo uk.cp1251.mo \
21 zh_TW.mo zh_TW.UTF-8.mo zh_CN.mo zh_CN.cp936.mo zh_CN.UTF-8.mo \
22 ja.sjis.mo
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000023
24PACKAGE = vim
25
26# Uncomment one of the lines below or modify it to put the path to your
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000027# gettext binaries
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000028ifndef GETTEXT_PATH
29#GETTEXT_PATH = C:/gettext.win32/bin/
30#GETTEXT_PATH = C:/gettext-0.10.35-w32/win32/Release/
31GETTEXT_PATH = /bin/
32endif
33
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000034# The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext
35# tools 0.10.37, which use a slightly different .po file format that is not
36# compatible with Solaris (and old gettext implementations) unless these are
37# set. gettext 0.10.36 will not work!
38MSGFMT = OLD_PO_FILE_INPUT=yes $(GETTEXT_PATH)msgfmt -v
39XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes $(GETTEXT_PATH)xgettext
40MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes $(GETTEXT_PATH)msgmerge
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000041
42# MV = move
43# CP = copy
44# RM = del
45# MKD = mkdir
46MV = mv -f
47CP = cp -f
48RM = rm -f
49MKD = mkdir -p
50
51.SUFFIXES:
52.SUFFIXES: .po .mo .pot
53.PHONY: first_time all install clean $(LANGUAGES)
54
55.po.mo:
56 $(MSGFMT) -o $@ $<
57
58all: $(MOFILES)
59
60first_time:
61 $(XGETTEXT) --default-domain=$(LANGUAGE) \
62 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
63
64$(LANGUAGES):
65 $(XGETTEXT) --default-domain=$(PACKAGE) \
66 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h)
67 $(MV) $(PACKAGE).po $(PACKAGE).pot
68 $(CP) $@.po $@.po.orig
69 $(MV) $@.po $@.po.old
70 $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
71 $(RM) $@.po.old
72
73install: $(MOFILES)
74 for TARGET in $(LANGUAGES); do \
75 $(MKD) $(VIMRUNTIME)/lang/$$TARGET/LC_MESSAGES ; \
76 $(CP) $$TARGET.mo $(VIMRUNTIME)/lang/$$TARGET/LC_MESSAGES/$(PACKAGE).mo ; \
77 done
78
79clean:
80 $(RM) *.mo
81 $(RM) *.pot
82
83