Mercurial > vim
annotate src/po/Make_mvc.mak @ 32669:448aef880252
normalize line endings
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 26 Jun 2023 09:54:34 +0200 |
parents | 0d2b75395eda |
children | 695b50472e85 |
rev | line source |
---|---|
32669
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
1 # Makefile for the Vim message translations for MSVC |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
2 # (based on make_ming.mak) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
3 # |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
4 # Mike Williams <mrw@eandem.co.uk> |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
5 # |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
6 # Please read README_mvc.txt before using this file. |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
7 # |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
8 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
9 !ifndef VIMRUNTIME |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
10 VIMRUNTIME = ..\..\runtime |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
11 !endif |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
12 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
13 # get LANGUAGES, MOFILES, MOCONVERTED and others |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
14 !include Make_all.mak |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
15 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
16 PACKAGE = vim |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
17 VIM = ..\vim |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
18 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
19 # Correct the following line for the directory where gettext et al is installed |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
20 GETTEXT_PATH = H:\gettext.0.14.4\bin |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
21 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
22 MSGFMT = $(GETTEXT_PATH)\msgfmt -v |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
23 XGETTEXT = $(GETTEXT_PATH)\xgettext |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
24 MSGMERGE = $(GETTEXT_PATH)\msgmerge |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
25 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
26 MV = move |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
27 CP = copy |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
28 RM = del |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
29 MKD = mkdir |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
30 LS = dir |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
31 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
32 LSFLAGS = /b /on /l /s |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
33 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
34 INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
35 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
36 .SUFFIXES: |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
37 .SUFFIXES: .po .mo .pot |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
38 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
39 .po.mo: |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
40 set OLD_PO_FILE_INPUT=yes |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
41 $(MSGFMT) -o $@ $< |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
42 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
43 all: $(MOFILES) $(MOCONVERTED) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
44 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
45 PO_INPUTLIST = \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
46 ..\*.c \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
47 ..\if_perl.xs \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
48 ..\GvimExt\gvimext.cpp \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
49 ..\errors.h \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
50 ..\globals.h \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
51 ..\if_py_both.h \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
52 ..\vim.h \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
53 gvim.desktop.in \ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
54 vim.desktop.in |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
55 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
56 files: $(PO_INPUTLIST) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
57 $(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
58 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
59 first_time: files |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
60 $(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
61 set OLD_PO_FILE_INPUT=yes |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
62 set OLD_PO_FILE_OUTPUT=yes |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
63 $(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments $(XGETTEXT_KEYWORDS) --files-from=.\files $(PO_VIM_JSLIST) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
64 $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
65 $(RM) *.js |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
66 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
67 $(PACKAGE).pot: files |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
68 $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
69 set OLD_PO_FILE_INPUT=yes |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
70 set OLD_PO_FILE_OUTPUT=yes |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
71 $(XGETTEXT) --default-domain=$(PACKAGE) --add-comments $(XGETTEXT_KEYWORDS) --files-from=.\files $(PO_VIM_JSLIST) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
72 $(MV) $(PACKAGE).po $(PACKAGE).pot |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
73 $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
74 $(RM) *.js |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
75 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
76 # Don't add a dependency here, we only want to update the .po files manually |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
77 $(LANGUAGES): |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
78 @$(MAKE) -nologo -f Make_mvc.mak $(PACKAGE).pot GETTEXT_PATH=$(GETTEXT_PATH) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
79 $(CP) $@.po $@.po.orig |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
80 $(MV) $@.po $@.po.old |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
81 $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
82 $(RM) $@.po.old |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
83 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
84 install: |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
85 if not exist $(INSTALLDIR) $(MKD) $(INSTALLDIR) |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
86 $(CP) $(LANGUAGE).mo $(INSTALLDIR)\$(PACKAGE).mo |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
87 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
88 install-all: all |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
89 FOR %%l IN ($(LANGUAGES)) DO @IF NOT EXIST $(VIMRUNTIME)\lang\%%l\LC_MESSAGES $(MKD) $(VIMRUNTIME)\lang\%%l\LC_MESSAGES |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
90 FOR %%l IN ($(LANGUAGES)) DO @$(CP) %%l.mo $(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
91 |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
92 clean: |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
93 $(RM) *.mo |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
94 $(RM) *.pot |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32499
diff
changeset
|
95 $(RM) files |