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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
# Point to our macro directory and pick up user flags from the environment
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
# Keep recursive, the tools depend on it
SUBDIRS = po
# -- scripts/ ------------------------
bin_SCRIPTS = scripts/ibus-setup-cangjie
libexec_SCRIPTS = scripts/ibus-engine-cangjie
scripts/ibus-%-cangjie: scripts/ibus-%-cangjie.in Makefile
$(AM_V_GEN) \
$(MKDIR_P) scripts; \
sed -e 's&@PYTHON_PATH@&$(PYTHON)&g' \
-e 's&@CANGJIE_GETTEXT_PACKAGE@&$(GETTEXT_PACKAGE)&g' \
-e 's&@LOCALEDIR@&$(localedir)&g' \
-e 's&@COMPONENTDIR@&$(COMPONENT_DIR)&g' \
-e 's&@PKGDATADIR@&$(pkgdatadir)&g' $< > $@
# -- data/ ---------------------------
ibus_cangjie_data_DATA = data/setup.ui
ibus_cangjie_datadir = $(pkgdatadir)
@INTLTOOL_XML_RULE@
appdata_in_files = data/cangjie.appdata.xml.in data/quick.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
appdatadir = $(datadir)/metainfo
component_in_in_files = data/cangjie.xml.in.in data/quick.xml.in.in
component_DATA = $(component_in_in_files:.xml.in.in=.xml)
componentdir = $(COMPONENT_DIR)
%.xml.in: %.xml.in.in
$(AM_V_GEN) \
sed -e 's&@_VERSION@&$(VERSION)&g' \
-e 's&@BINDIR@&$(bindir)&g' \
-e 's&@ICON16DIR@&$(icon16dir)&g' \
-e 's&@PKGLIBEXECDIR@&$(libexecdir)&g' $< > $@
gsettings_in_files = data/org.cangjians.ibus.cangjie.gschema.xml.in data/org.cangjians.ibus.quick.gschema.xml.in
gsettings_SCHEMAS = $(gsettings_in_files:.xml.in=.xml)
@GSETTINGS_RULES@
desktop_in_in_files = \
data/ibus-setup-cangjie.desktop.in.in \
data/ibus-setup-quick.desktop.in.in \
$(NULL)
desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
desktopdir = $(datadir)/applications
@INTLTOOL_DESKTOP_RULE@
%.desktop.in: %.desktop.in.in
$(AM_V_GEN) \
( \
bindir=${bindir}; \
s=`cat $<`; \
eval "echo \"$${s}\""; \
) > $@
icon16dir = $(datadir)/icons/hicolor/16x16/intl
icon16_DATA = data/icons/16x16/cangjie.png data/icons/16x16/quick.png
iconscalabledir = $(datadir)/icons/hicolor/scalable/intl
iconscalable_DATA = data/icons/scalable/cangjie.svg data/icons/scalable/quick.svg
icon_files = $(icon16_DATA) $(iconscalable_DATA)
# -- src/ ----------------------------
ibus_cangjie_PYTHON = \
src/__init__.py \
src/canberra.py \
src/engine.py \
src/setup.py \
$(NULL)
ibus_cangjiedir = $(pythondir)/ibus_cangjie
# -- Testing -------------------------
TESTS = tests/run_tests
tests/run_tests: tests/run_tests.in
$(MKDIR_P) tests
sed -e 's&@PYTHON_BIN@&$(PYTHON)&g' \
-e 's&@SRCDIR@&$(srcdir)&g' \
-e 's&@BUILDDIR@&$(builddir)&g' $< > $@
chmod +x $@
# -- Common --------------------------
AUTHORS:
$(AM_V_GEN) \
if test -d "$(srcdir)/.git"; then \
echo Creating $@ && \
( cd "$(top_srcdir)" && \
echo -e '# Generated by Makefile. Do not edit.\n#'; \
echo -e '# IBus Cangjie was written by these people:\n'; \
git log --no-merges --pretty=format:"%an <%ae>" \
| sort | uniq ) > $@.tmp && mv -f $@.tmp $@ \
|| ( rm -f $@.tmp ; echo Failed to generate $@ >&2 ); \
fi
# The INTLTOOL_XML_RULE stuff doesn't create that directory properly, so let's
# help it a bit
BUILT_SOURCES = $(top_builddir)/data
$(top_builddir)/data:
$(AM_V_GEN) $(MKDIR_P) $(top_builddir)/data
CLEANFILES = \
$(appdata_DATA) \
$(component_DATA) \
$(component_in_files) \
$(desktop_DATA) \
$(desktop_in_files) \
$(gsettings_SCHEMAS) \
$(bin_SCRIPTS) \
$(libexec_SCRIPTS) \
src/*.pyc \
tests/run_tests \
data/gschemas.compiled \
$(NULL)
clean-local:
-rm -rf src/__pycache__
-rm -rf tests/__pycache__
EXTRA_DIST = \
autogen.sh \
data/setup.ui \
$(appdata_in_files) \
$(component_in_in_files) \
$(desktop_in_in_files) \
$(gsettings_in_files) \
$(icon_files) \
README.md \
$(wildcard $(srcdir)/scripts/*.in) \
tests/run_tests.in \
tests/__init__.py \
$(wildcard $(srcdir)/tests/test_*.py) \
$(NULL)
.PHONY: AUTHORS $(top_builddir)/data
|