comparison src/po/Make_ming.mak @ 12748:f48a1c8c5961 v8.0.1252

patch 8.0.1252: incomplete translations makefile for MinGW/Cygwin commit https://github.com/vim/vim/commit/8889a5c305e69aa49fd08036e624e365097a5b7b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 2 19:27:36 2017 +0100 patch 8.0.1252: incomplete translations makefile for MinGW/Cygwin Problem: Incomplete translations makefile for MinGW/Cygwin. Solution: Add missing source files. Make it work with msys2's bash. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2017 19:30:07 +0100
parents 7e367104f6b6
children cf04dbb33f41
comparison
equal deleted inserted replaced
12747:8ff75dee2bdb 12748:f48a1c8c5961
9 # Previous to all you must have the environment variable LANGUAGE set to your 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. 10 # language (xx) and add it to the next three lines.
11 # 11 #
12 12
13 ifndef VIMRUNTIME 13 ifndef VIMRUNTIME
14 ifeq (sh.exe, $(SHELL))
14 VIMRUNTIME = ..\..\runtime 15 VIMRUNTIME = ..\..\runtime
16 else
17 VIMRUNTIME = ../../runtime
18 endif
15 endif 19 endif
16 20
17 LANGUAGES = \ 21 LANGUAGES = \
18 af \ 22 af \
19 ca \ 23 ca \
98 # gettex binaries; I use the first 102 # gettex binaries; I use the first
99 #GETTEXT_PATH = C:/gettext.win32/bin/ 103 #GETTEXT_PATH = C:/gettext.win32/bin/
100 #GETTEXT_PATH = C:/gettext-0.10.35-w32/win32/Release/ 104 #GETTEXT_PATH = C:/gettext-0.10.35-w32/win32/Release/
101 #GETTEXT_PATH = C:/cygwin/bin/ 105 #GETTEXT_PATH = C:/cygwin/bin/
102 106
107 ifeq (sh.exe, $(SHELL))
103 MSGFMT = set OLD_PO_FILE_INPUT=yes && $(GETTEXT_PATH)msgfmt -v 108 MSGFMT = set OLD_PO_FILE_INPUT=yes && $(GETTEXT_PATH)msgfmt -v
104 XGETTEXT = set OLD_PO_FILE_INPUT=yes && set OLD_PO_FILE_OUTPUT=yes && $(GETTEXT_PATH)xgettext 109 XGETTEXT = set OLD_PO_FILE_INPUT=yes && set OLD_PO_FILE_OUTPUT=yes && $(GETTEXT_PATH)xgettext
105 MSGMERGE = set OLD_PO_FILE_INPUT=yes && set OLD_PO_FILE_OUTPUT=yes && $(GETTEXT_PATH)msgmerge 110 MSGMERGE = set OLD_PO_FILE_INPUT=yes && set OLD_PO_FILE_OUTPUT=yes && $(GETTEXT_PATH)msgmerge
111 else
112 MSGFMT = LANG=C OLD_PO_FILE_INPUT=yes $(GETTEXT_PATH)msgfmt -v
113 XGETTEXT = LANG=C OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes $(GETTEXT_PATH)xgettext
114 MSGMERGE = LANG=C OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes $(GETTEXT_PATH)msgmerge
115 endif
106 116
117 ifeq (sh.exe, $(SHELL))
107 MV = move 118 MV = move
108 CP = copy 119 CP = copy
109 RM = del 120 RM = del
110 MKD = mkdir 121 MKD = mkdir
122 else
123 MV = mv -f
124 CP = cp -f
125 RM = rm -f
126 MKD = mkdir -p
127 endif
111 128
112 .SUFFIXES: 129 .SUFFIXES:
113 .SUFFIXES: .po .mo .pot 130 .SUFFIXES: .po .mo .pot
114 .PHONY: first_time all install clean $(LANGUAGES) 131 .PHONY: first_time all install clean $(LANGUAGES)
115 132
118 135
119 all: $(MOFILES) 136 all: $(MOFILES)
120 137
121 first_time: 138 first_time:
122 $(XGETTEXT) --default-domain=$(LANGUAGE) \ 139 $(XGETTEXT) --default-domain=$(LANGUAGE) \
123 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h) 140 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h
124 141
125 $(LANGUAGES): 142 $(LANGUAGES):
126 $(XGETTEXT) --default-domain=$(PACKAGE) \ 143 $(XGETTEXT) --default-domain=$(PACKAGE) \
127 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs $(wildcard ../globals.h) 144 --add-comments --keyword=_ --keyword=N_ $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h
128 $(MV) $(PACKAGE).po $(PACKAGE).pot 145 $(MV) $(PACKAGE).po $(PACKAGE).pot
129 $(CP) $@.po $@.po.orig 146 $(CP) $@.po $@.po.orig
130 $(MV) $@.po $@.po.old 147 $(MV) $@.po $@.po.old
131 $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po 148 $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
132 $(RM) $@.po.old 149 $(RM) $@.po.old
134 install: 151 install:
135 $(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE) 152 $(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE)
136 $(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES 153 $(MKD) $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
137 $(CP) $(LANGUAGE).mo $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES\$(PACKAGE).mo 154 $(CP) $(LANGUAGE).mo $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES\$(PACKAGE).mo
138 155
156 ifeq (sh.exe, $(SHELL))
139 install-all: all 157 install-all: all
140 FOR %%l IN ($(LANGUAGES)) DO @IF NOT EXIST $(VIMRUNTIME)\lang\%%l $(MKD) $(VIMRUNTIME)\lang\%%l 158 FOR %%l IN ($(LANGUAGES)) DO @IF NOT EXIST $(VIMRUNTIME)\lang\%%l $(MKD) $(VIMRUNTIME)\lang\%%l
141 FOR %%l IN ($(LANGUAGES)) DO @IF NOT EXIST $(VIMRUNTIME)\lang\%%l\LC_MESSAGES $(MKD) $(VIMRUNTIME)\lang\%%l\LC_MESSAGES 159 FOR %%l IN ($(LANGUAGES)) DO @IF NOT EXIST $(VIMRUNTIME)\lang\%%l\LC_MESSAGES $(MKD) $(VIMRUNTIME)\lang\%%l\LC_MESSAGES
142 FOR %%l IN ($(LANGUAGES)) DO @$(CP) %%l.mo $(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo 160 FOR %%l IN ($(LANGUAGES)) DO @$(CP) %%l.mo $(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo
161 else
162 install-all: all
163 for TARGET in $(LANGUAGES); do \
164 $(MKD) $(VIMRUNTIME)/lang/$$TARGET/LC_MESSAGES ; \
165 $(CP) $$TARGET.mo $(VIMRUNTIME)/lang/$$TARGET/LC_MESSAGES/$(PACKAGE).mo ; \
166 done
167 endif
143 168
144 clean: 169 clean:
145 $(RM) *.mo 170 $(RM) *.mo
146 $(RM) *.pot 171 $(RM) *.pot
147 172