annotate src/po/Makefile @ 34481:de28179cc9cd

runtime(sh): Update syntax file, fix issue #962 (#14138) Commit: https://github.com/vim/vim/commit/1bdc9435c1a14ca1a30e5b5927ab63f603ec4409 Author: dkearns <dougkearns@gmail.com> Date: Tue Mar 5 05:14:08 2024 +1100 runtime(sh): Update syntax file, fix issue https://github.com/vim/vim/issues/962 (https://github.com/vim/vim/issues/14138) Allow the opening parenthesis of a multiline array assignment, within an if statement, to appear at EOL. Fixes issue #962. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 04 Mar 2024 19:15:06 +0100
parents c5a10c03afb8
children 748a8a413816
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
1 # Makefile for the Vim message translations.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
2
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
3 # Include stuff found by configure.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
4 include ../auto/config.mk
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
5
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
6 # get LANGUAGES, MOFILES, MOCONVERTED and others
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
7 include Make_all.mak
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
8
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
9 # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
10 # not installed on Unix
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
11
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
12 PACKAGE = vim
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
13 SHELL = /bin/sh
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
14 VIM = ../vim
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
15
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
16 # MacOS sed is locale aware, set $LANG to avoid problems
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
17 SED = LANG=C sed
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
18
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
19 # The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
20 # tools 0.10.37, which use a slightly different .po file format that is not
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
21 # compatible with Solaris (and old gettext implementations) unless these are
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
22 # set. gettext 0.10.36 will not work!
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
23 MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMT) -v
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
24 XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
25 MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
26
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
27 .SUFFIXES:
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
28 .SUFFIXES: .po .mo .pot .ck
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
29 .PHONY: all install uninstall prefixcheck originals converted check clean \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
30 checkclean distclean update-po $(LANGUAGES)
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
31
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
32 all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
33
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
34 originals: $(MOFILES)
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
35
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
36 converted: $(MOCONVERTED)
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
37
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
38 .po.mo:
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
39 $(MSGFMTCMD) -o $@ $<
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
40
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
41 .po.ck:
33831
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
42 $(VIM) -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
43 -c "if error == 0 | q | else | num 2 | cq | endif" $<
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
44 touch $@
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
45
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
46 check: $(CHECKFILES)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
47
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
48 # installing for real
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
49 install: $(MOFILES) $(MOCONVERTED)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
50 @$(MAKE) prefixcheck
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
51 for lang in $(LANGUAGES); do \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
52 dir=$(LOCALEDIR)/$$lang/; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
53 if test ! -x "$$dir"; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
54 mkdir $$dir; chmod 755 $$dir; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
55 fi; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
56 dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
57 if test ! -x "$$dir"; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
58 mkdir $$dir; chmod 755 $$dir; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
59 fi; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
60 if test -r $$lang.mo; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
61 $(INSTALL_DATA) $$lang.mo $$dir/$(PACKAGE).mo; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
62 chmod $(FILEMOD) $$dir/$(PACKAGE).mo; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
63 fi; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
64 done
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
65
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
66 uninstall:
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
67 @$(MAKE) prefixcheck
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
68 for cat in $(MOFILES) $(MOCONVERTED); do \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
69 cat=`basename $$cat`; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
70 lang=`echo $$cat | $(SED) 's/\$(CATOBJEXT)$$//'`; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
71 rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
72 done
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
73
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
74 # installing for local tryout into ../../runtime/lang
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
75 tryoutinstall: $(MOFILES) $(MOCONVERTED)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
76 @$(MAKE) prefixcheck
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
77 for lang in $(LANGUAGES); do \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
78 dir=../../runtime/lang/$$lang/; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
79 if test ! -x "$$dir"; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
80 mkdir $$dir; chmod 755 $$dir; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
81 fi; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
82 dir=../../runtime/lang/$$lang/LC_MESSAGES; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
83 if test ! -x "$$dir"; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
84 mkdir $$dir; chmod 755 $$dir; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
85 fi; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
86 if test -r $$lang.mo; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
87 cp $$lang.mo $$dir/$(PACKAGE).mo; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
88 chmod 644 $$dir/$(PACKAGE).mo; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
89 fi; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
90 done
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
91
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
92 # nl.po was added later, if it does not exist use a file with just a # in it
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
93 # (an empty file doesn't work with old msgfmt).
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
94 nl.po:
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
95 @( echo \# >> nl.po )
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
96
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
97 # Norwegian/Bokmal: "nb" is an alias for "no".
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
98 # Copying the file is not efficient, but I don't know of another way to make
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
99 # this work.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
100 nb.po: no.po
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
101 cp no.po nb.po
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
102
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
103 # Convert ja.po to create ja.sjis.po. Requires doubling backslashes in the
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
104 # second byte. Don't depend on sjiscorr, it should only be compiled when
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
105 # ja.sjis.po is outdated.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
106 ja.sjis.po: ja.po
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
107 @$(MAKE) sjiscorr
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
108 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
109 iconv -f UTF-8 -t CP932 $< | ./sjiscorr > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
110
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
111 sjiscorr: sjiscorr.c
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
112 $(CC) -o sjiscorr sjiscorr.c
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
113
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
114 ja.euc-jp.po: ja.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
115 iconv -f UTF-8 -t EUC-JP $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
116 $(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-JP/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
117 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
118 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
119
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
120 # Convert cs.po to create cs.cp1250.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
121 cs.cp1250.po: cs.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
122 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
123 iconv -f ISO-8859-2 -t CP1250 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
124 $(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
125 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
126 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
127
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
128 # Convert pl.po to create pl.cp1250.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
129 pl.cp1250.po: pl.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
130 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
131 iconv -f ISO-8859-2 -t CP1250 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
132 $(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
133 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
134 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
135
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
136 # Convert pl.po to create pl.UTF-8.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
137 pl.UTF-8.po: pl.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
138 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
139 iconv -f ISO-8859-2 -t UTF-8 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
140 $(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=UTF-8/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
141 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
142 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
143
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
144 # Convert sk.po to create sk.cp1250.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
145 sk.cp1250.po: sk.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
146 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
147 iconv -f ISO-8859-2 -t CP1250 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
148 $(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
149 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
150 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
151
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
152 # Convert zh_CN.UTF-8.po to create zh_CN.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
153 zh_CN.po: zh_CN.UTF-8.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
154 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
155 iconv -f UTF-8 -t GB2312 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
156 $(SED) -e 's/charset=[uU][tT][fF]-8/charset=GB2312/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
157 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
158 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
159
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
160 # Convert zh_CN.UTF-8.po to create zh_CN.cp936.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
161 # Set 'charset' to gbk to avoid that msfmt generates a warning.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
162 # This used to convert from zh_CN.po, but that results in a conversion error.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
163 zh_CN.cp936.po: zh_CN.UTF-8.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
164 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
165 iconv -f UTF-8 -t CP936 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
166 $(SED) -e 's/charset=[uU][tT][fF]-8/charset=GBK/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
167 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
168 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
169
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
170 # Convert zh_TW.UTF-8.po to create zh_TW.po
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
171 zh_TW.po: zh_TW.UTF-8.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
172 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
173 iconv -f UTF-8 -t BIG5 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
174 $(SED) -e 's/charset=[uU][tT][fF]-8/charset=BIG5/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
175 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
176 > $@
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
177
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
178
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
179 # Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
180 # Requires doubling backslashes in the second byte. Don't depend on big5corr,
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
181 # it should only be compiled when zh_TW.po is outdated.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
182
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
183 #
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
184 # 06.11.23, added by Restorer
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
185 # For more details, see:
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
186 # https://github.com/vim/vim/pull/3261
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
187 # https://github.com/vim/vim/pull/3476
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
188 # https://github.com/vim/vim/pull/12153
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
189 # (read all comments)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
190 #
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
191 # I checked the workability on the list of backslash characters
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
192 # specified in zh_TW.UTF-8.po. It works.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
193 # But it is better to have someone native speaker check it.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
194 #
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
195
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
196 #zh_TW.po: zh_TW.UTF-8.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
197 # @$(MAKE) big5corr
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
198 # rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
199 # iconv -f UTF-8 -t BIG5 $< | ./big5corr > $@
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
200
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
201
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
202 # 06.11.23, added by Restorer
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
203 # see above in the zh_tw.po conversion section for backslashes.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
204 #big5corr: big5corr.c
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
205 # $(CC) -o big5corr big5corr.c
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
206
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
207
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
208 # Convert ko.UTF-8.po to create ko.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
209 ko.po: ko.UTF-8.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
210 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
211 iconv -f UTF-8 -t EUC-KR $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
212 $(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-KR/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
213 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
214 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
215
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
216 # Convert ru.po to create ru.cp1251.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
217 ru.cp1251.po: ru.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
218 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
219 iconv -f UTF-8 -t CP1251 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
220 $(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
221 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
222 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
223
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
224 # Convert uk.po to create uk.cp1251.po.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
225 uk.cp1251.po: uk.po
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
226 rm -f $@
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
227 iconv -f UTF-8 -t CP1251 $< | \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
228 $(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
229 -e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
230 > $@
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
231
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
232 prefixcheck:
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
233 @if test "x" = "x$(prefix)"; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
234 echo "******************************************"; \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
235 echo " Please use make from the src directory "; \
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
236 echo "******************************************"; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
237 exit 1; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
238 fi
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
239
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
240 clean: checkclean
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
241 rm -f core core.* *.old.po *.mo *.pot sjiscorr
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
242 rm -f LINGUAS vim.desktop gvim.desktop tmp_*desktop
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
243 # rm -f big5corr
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
244
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
245 distclean: clean
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
246
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
247 checkclean:
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
248 rm -f *.ck
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
249
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
250 PO_INPUTLIST = \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
251 ../*.c \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
252 ../if_perl.xs \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
253 ../GvimExt/gvimext.cpp \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
254 ../errors.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
255 ../globals.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
256 ../if_py_both.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
257 ../vim.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
258 gvim.desktop.in \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
259 vim.desktop.in
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
260
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
261 $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
262 # Convert the Vim scripts to (what looks like) Javascript
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
263 $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
264 # create vim.pot
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
265 $(XGETTEXT) --default-domain=$(PACKAGE) --add-comments \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
266 $(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
267 mv -f $(PACKAGE).po $(PACKAGE).pot
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
268 # Fix Vim scripts names, so that "gf" works
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
269 $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
270 # Delete the temporary files
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
271 rm *.js
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
272
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
273 vim.desktop: vim.desktop.in $(POFILES)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
274 echo $(LANGUAGES) | tr " " "\n" |$(SED) -e '/\./d' | sort > LINGUAS
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
275 $(MSGFMT) --desktop -d . --template vim.desktop.in -o tmp_vim.desktop
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
276 rm -f LINGUAS
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
277 if command -v desktop-file-validate; then desktop-file-validate tmp_vim.desktop; fi
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
278 mv tmp_vim.desktop vim.desktop
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
279
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
280 # The dependency on vim.desktop is only to avoid the two targets are build at
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
281 # the same time, which causes a race for the LINGUAS file.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
282 gvim.desktop: gvim.desktop.in $(POFILES) vim.desktop
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
283 echo $(LANGUAGES) | tr " " "\n" |$(SED) -e '/\./d' | sort > LINGUAS
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
284 $(MSGFMT) --desktop -d . --template gvim.desktop.in -o tmp_gvim.desktop
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
285 rm -f LINGUAS
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
286 if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
287 mv tmp_gvim.desktop gvim.desktop
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
288
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
289 # Only original translations with default encoding should be updated.
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
290 # The files that are converted to a different encoding clearly state "DO NOT EDIT".
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
291 update-po: $(MOFILES:.mo=)
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
292
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
293 # Don't add a dependency here, we only want to update the .po files manually
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
294 $(LANGUAGES):
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
295 @$(MAKE) $(PACKAGE).pot
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
296 if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
297 mv $@.po $@.po.old
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
298 if $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po; then \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
299 rm -f $@.po.old; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
300 else \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
301 echo "msgmerge for $@.po failed!"; mv $@.po.old $@.po; \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
302 fi