diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2016-07-27 11:25:32 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2016-07-27 11:25:32 +0900 |
commit | eee7a132d686cb8d9c36c632523649745487b503 (patch) | |
tree | 79b8be3a62a06566e530ee4b7d856b7b8abdf73e | |
parent | 20068d9d0731b580d6d8218b97c482c0558149dd (diff) | |
download | ibus-eee7a132d686cb8d9c36c632523649745487b503.tar.gz |
Fix make dist
'make dist' has different directories between builddir and srcdir.
src/tests/runtest gets the builddir of ibus-memconf from the
srcdir of memconf.xml and the builddir of ibus-engine-simple
from the srcdir of simple.xml.
bindings/pygobject/test-override-ibus.py runs IBus.Keymap.new()
and gets the path of keymaps from IBUS_KEYMAP_PATH variable.
bindings/vala/ibus-1.0.vapi needs to be cleaned by 'make distclean'.
R=shawn.p.huang@gmail.com
Review URL: https://codereview.appspot.com/305950043
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | bindings/pygobject/Makefile.am | 4 | ||||
-rw-r--r-- | bindings/vala/Makefile.am | 6 | ||||
-rw-r--r-- | src/ibuskeymap.c | 6 | ||||
-rwxr-xr-x | src/tests/runtest | 5 |
5 files changed, 16 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 425d1ec2..38515c67 100644 --- a/Makefile.am +++ b/Makefile.am @@ -90,7 +90,6 @@ install-data-hook: DISTCHECK_CONFIGURE_FLAGS = \ --enable-gtk-doc \ --disable-schemas-install \ - --disable-introspection \ $(NULL) dist-hook: diff --git a/bindings/pygobject/Makefile.am b/bindings/pygobject/Makefile.am index 53b36ef3..238a537a 100644 --- a/bindings/pygobject/Makefile.am +++ b/bindings/pygobject/Makefile.am @@ -3,7 +3,7 @@ # ibus - The Input Bus # # Copyright (c) 2012 Daiki Ueno <ueno@unixuser.org> -# Copyright (c) 2014 Peng Huang <shawn.p.huang@gmail.com> +# Copyright (c) 2014-2016 Peng Huang <shawn.p.huang@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -39,10 +39,12 @@ if ENABLE_TESTS TESTS += test-override-ibus.py endif +# IBus.Keymap() accesses keymap files TESTS_ENVIRONMENT = \ PYTHONPATH=$(top_srcdir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$$LD_LIBRARY_PATH \ GI_TYPELIB_PATH=$(top_builddir)/src:$$GI_TYPELIB_PATH \ + IBUS_KEYMAP_PATH=$(top_srcdir)/data/keymaps \ $(NULL) LOG_COMPILER = $(PYTHON) -B diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 5a354238..f3eb0d40 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -2,8 +2,8 @@ # # ibus - The Input Bus # -# Copyright (c) 2007-2015 Peng Huang <shawn.p.huang@gmail.com> -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2007-2016 Peng Huang <shawn.p.huang@gmail.com> +# Copyright (c) 2007-2016 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -43,6 +43,8 @@ vapidir = $(datadir)/vala/vapi vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps) MAINTAINERCLEANFILES = $(VAPIGEN_VAPIS) +# for make distclean +CONFIG_CLEAN_FILES = $(VAPIGEN_VAPIS) EXTRA_DIST = \ $(VAPIGEN_VAPIS) \ diff --git a/src/ibuskeymap.c b/src/ibuskeymap.c index 79550332..d7428c5d 100644 --- a/src/ibuskeymap.c +++ b/src/ibuskeymap.c @@ -159,13 +159,17 @@ static gboolean ibus_keymap_load (const gchar *name, KEYMAP keymap) { + const gchar *envstr; gchar *fname; FILE *pf; gchar buf[256]; gint lineno; - fname = g_build_filename (IBUS_DATA_DIR, "keymaps", name, NULL); + if ((envstr = g_getenv ("IBUS_KEYMAP_PATH")) != NULL) + fname = g_build_filename (envstr, name, NULL); + else + fname = g_build_filename (IBUS_DATA_DIR, "keymaps", name, NULL); if (fname == NULL) { return FALSE; diff --git a/src/tests/runtest b/src/tests/runtest index 81dc62d1..91c4e95f 100755 --- a/src/tests/runtest +++ b/src/tests/runtest @@ -66,9 +66,12 @@ func_cleanup () { func_copy_component () { file=$1 base=`func_basename $file` + libexecdir=`func_dirname $file` + # top_srcdir != top_builddir in make dist + libexecdir=`echo "$libexecdir" | sed -e "s|$top_srcdir|$top_builddir|"` if test -f $file.in; then mkdir -p components - sed 's|@libexecdir@|'`func_dirname $file`'|g' < $file.in > components/$base + sed "s|@libexecdir@|$libexecdir|g" < $file.in > components/$base fi } |