1
# Point to our macro directory and pick up user flags from the environment
2
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
4
# Keep recursive, the tools depend on it
8
# -- scripts/ ------------------------
9
bin_SCRIPTS = scripts/ibus-setup-cangjie
11
pkglibexec_SCRIPTS = scripts/ibus-engine-cangjie
12
libexecdir = $(prefix)/lib
14
scripts/ibus-%-cangjie: scripts/ibus-%-cangjie.in Makefile
17
sed -e 's&@PYTHON_PATH@&$(PYTHON)&g' \
18
-e 's&@CANGJIE_GETTEXT_PACKAGE@&$(GETTEXT_PACKAGE)&g' \
19
-e 's&@LOCALEDIR@&$(localedir)&g' \
20
-e 's&@COMPONENTDIR@&$(COMPONENT_DIR)&g' \
21
-e 's&@PKGDATADIR@&$(pkgdatadir)&g' $< > $@
24
# -- data/ ---------------------------
25
ibus_cangjie_data_DATA = data/setup.ui
26
ibus_cangjie_datadir = $(pkgdatadir)
29
appdata_in_files = data/cangjie.appdata.xml.in data/quick.appdata.xml.in
30
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
31
appdatadir = $(datadir)/appdata
33
component_in_in_files = data/cangjie.xml.in.in data/quick.xml.in.in
34
component_DATA = $(component_in_in_files:.xml.in.in=.xml)
35
componentdir = $(COMPONENT_DIR)
38
sed -e 's&@_VERSION@&$(VERSION)&g' \
39
-e 's&@BINDIR@&$(bindir)&g' \
40
-e 's&@ICON16DIR@&$(icon16dir)&g' \
41
-e 's&@PKGLIBEXECDIR@&$(pkglibexecdir)&g' $< > $@
43
gsettings_in_files = data/org.cangjians.ibus.cangjie.gschema.xml.in data/org.cangjians.ibus.quick.gschema.xml.in
44
gsettings_SCHEMAS = $(gsettings_in_files:.xml.in=.xml)
47
desktop_in_in_files = \
48
data/ibus-setup-cangjie.desktop.in.in \
49
data/ibus-setup-quick.desktop.in.in \
51
desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
52
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
53
desktopdir = $(datadir)/applications
54
@INTLTOOL_DESKTOP_RULE@
55
%.desktop.in: %.desktop.in.in
60
eval "echo \"$${s}\""; \
63
icon16dir = $(datadir)/icons/hicolor/16x16/intl
64
icon16_DATA = data/icons/16x16/cangjie.png data/icons/16x16/quick.png
65
iconscalabledir = $(datadir)/icons/hicolor/scalable/intl
66
iconscalable_DATA = data/icons/scalable/cangjie.svg data/icons/scalable/quick.svg
67
icon_files = $(icon16_DATA) $(iconscalable_DATA)
70
# -- src/ ----------------------------
71
ibus_cangjie_PYTHON = \
77
ibus_cangjiedir = $(pythondir)/ibus_cangjie
80
# -- Testing -------------------------
81
TESTS = tests/run_tests
83
tests/run_tests: tests/run_tests.in
85
sed -e 's&@PYTHON_BIN@&$(PYTHON)&g' \
86
-e 's&@SRCDIR@&$(srcdir)&g' \
87
-e 's&@BUILDDIR@&$(builddir)&g' $< > $@
91
# -- Common --------------------------
94
if test -d "$(srcdir)/.git"; then \
96
( cd "$(top_srcdir)" && \
97
echo -e '# Generated by Makefile. Do not edit.\n#'; \
98
echo -e '# IBus Cangjie was written by these people:\n'; \
99
git log --no-merges --pretty=format:"%an <%ae>" \
100
| sort | uniq ) > $@.tmp && mv -f $@.tmp $@ \
101
|| ( rm -f $@.tmp ; echo Failed to generate $@ >&2 ); \
104
# The INTLTOOL_XML_RULE stuff doesn't create that directory properly, so let's
106
BUILT_SOURCES = $(top_builddir)/data
107
$(top_builddir)/data:
108
$(AM_V_GEN) $(MKDIR_P) $(top_builddir)/data
113
$(component_in_files) \
115
$(desktop_in_files) \
116
$(gsettings_SCHEMAS) \
118
$(pkglibexec_SCRIPTS) \
121
data/gschemas.compiled \
125
-rm -rf src/__pycache__
126
-rm -rf tests/__pycache__
131
$(appdata_in_files) \
132
$(component_in_in_files) \
133
$(desktop_in_in_files) \
134
$(gsettings_in_files) \
137
$(wildcard $(srcdir)/scripts/*.in) \
140
$(wildcard $(srcdir)/tests/test_*.py) \
143
.PHONY: AUTHORS $(top_builddir)/data