fixes lua 5.2 compile
[platform/upstream/ibus-libpinyin.git] / data / Makefile.am
1 # vim:set noet ts=4:
2 #
3 # ibus-libpinyin - Intelligent Pinyin engine based on libpinyin for IBus
4 #
5 # Copyright (c) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
21 WORDLIST = wordlist
22 ENGLISH_AWK = english.awk
23 ENGLISH_DB = english.db
24
25 STROKES = strokes
26 STROKES_AWK = strokes.awk
27 STROKES_DB = strokes.db
28
29 SUBDIRS = \
30         icons \
31         $(NULL)
32
33 auxiliary_db_DATA = \
34         $(ENGLISH_DB) \
35         $(STROKES_DB) \
36         $(NULL)
37 auxiliary_dbdir = $(pkgdatadir)/db
38
39 $(ENGLISH_DB): $(WORDLIST) $(ENGLISH_AWK)
40         $(AM_V_GEN) \
41         $(RM) $@; \
42         $(AWK) -f $(srcdir)/$(ENGLISH_AWK) $(srcdir)/$(WORDLIST) | @SQLITE3@ $@ || \
43                 ( $(RM) $@ ; exit 1 )
44
45 $(STROKES_DB): $(STROKES) $(STROKES_AWK)
46         $(AM_V_GEN) \
47         $(RM) $@; \
48         $(AWK) -f $(srcdir)/$(STROKES_AWK) $(srcdir)/$(STROKES) | @SQLITE3@ $@ || \
49                 ( $(RM) $@ ; exit 1 )
50
51 desktop_in_in_files = \
52         ibus-setup-libbopomofo.desktop.in.in \
53         ibus-setup-libpinyin.desktop.in.in \
54         $(NULL)
55
56 desktop_in_files = $(desktop_in_in_files:.in.in=.in)
57
58 $(desktop_in_files): %.desktop.in: %.desktop.in.in Makefile
59         $(AM_V_GEN) sed \
60                 -e "s|\@libexecdir\@|$(libexecdir)|" \
61                 -e "s|\@pkgdatadir\@|$(pkgdatadir)|" \
62                 $< > $@.tmp && mv $@.tmp $@
63
64 desktopdir=$(datadir)/applications
65 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
66
67 @INTLTOOL_DESKTOP_RULE@
68
69 EXTRA_DIST = \
70         $(desktop_in_in_files) \
71         $(WORDLIST) \
72         $(ENGLISH_AWK) \
73         $(STROKES) \
74         $(STROKES_AWK) \
75         $(NULL)
76
77 CLEANFILES = \
78         $(ENGLISH_DB) \
79         $(STROKES_DB) \
80         $(desktop_in_files) \
81         $(desktop_DATA) \
82         $(NULL)