blob: 15db89864f538c247d7e2cbd9e017d6ee6c908d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
keyboardsdir = $(pkgdatadir)/keyboards
keyboards_DATA = \
hangul-keyboard-2.xml \
hangul-keyboard-2y.xml \
hangul-keyboard-39.xml \
hangul-keyboard-3f.xml \
hangul-keyboard-32.xml \
hangul-keyboard-3s.xml \
hangul-keyboard-3y.xml \
hangul-keyboard-ro.xml \
hangul-keyboard-ahn.xml \
hangul-combination-default.xml \
hangul-combination-full.xml \
$(NULL)
EXTRA_DIST = \
hangul-keyboard-2.xml.template \
hangul-keyboard-2y.xml.template \
hangul-keyboard-39.xml.template \
hangul-keyboard-3f.xml.template \
hangul-keyboard-32.xml.template \
hangul-keyboard-3s.xml.template \
hangul-keyboard-3y.xml.template \
hangul-keyboard-ro.xml.template \
hangul-keyboard-ahn.xml.template \
hangul-combination-default.xml \
hangul-combination-full.xml \
its/hangul-keyboard.its \
its/hangul-keyboard.loc \
$(NULL)
# its 폴더의 *.its, *.loc rule을 사용하기 위해 GETTEXTDATADIRS 지정
MSGFMT_COMMAND = env GETTEXTDATADIRS=$(srcdir) $(MSGFMT)
# msgfmt으로 xml 파일을 번역하면 들여쓰기 크기가 바뀌고 같은 줄에 달린 주석
# 앞에 줄바꿈이 추가된다. 이를 방지하고자 root node와 name 부분만 별도의
# name.xml로 만들어 (msgfmt 입출력은 valid XML만 가능하므로 root node도 포함.)
# 번역한후 template과 name.xml을 병합하여 키보드 xml 파일을 생성한다.
hangul-keyboard-%.xml: hangul-keyboard-%.name.xml hangul-keyboard-%.xml.template
sed -i -e '1 D' \
-e '/^<hangul-keyboard/D' \
-e '/^<\/hangul-keyboard/D' \
-e 's/^ *<name/ <name/' $<
sed \
-e '/<name>/r $<' \
-e '/<name>/D' \
$(srcdir)/$@.template > $@
hangul-keyboard-%.name.xml.in: hangul-keyboard-%.xml.template
grep "xml version=" $< > $@
grep "<hangul-keyboard" $< >> $@
grep "<name>" $< >> $@
grep "</hangul-keyboard" $< >> $@
hangul-keyboard-%.name.xml: hangul-keyboard-%.name.xml.in Makefile
$(AM_V_GEN)$(MSGFMT_COMMAND) --xml --template $< -d $(top_srcdir)/po -o $@
CLEANFILES = \
hangul-keyboard-2.xml \
hangul-keyboard-2y.xml \
hangul-keyboard-39.xml \
hangul-keyboard-3f.xml \
hangul-keyboard-32.xml \
hangul-keyboard-3s.xml \
hangul-keyboard-3y.xml \
hangul-keyboard-ro.xml \
hangul-keyboard-ahn.xml \
$(NULL)
|