summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lua/Makefile.am13
-rw-r--r--lua/test-lua-plugin.c2
-rw-r--r--src/Makefile.am2
3 files changed, 12 insertions, 5 deletions
diff --git a/lua/Makefile.am b/lua/Makefile.am
index d357e58..a834cf8 100644
--- a/lua/Makefile.am
+++ b/lua/Makefile.am
@@ -18,8 +18,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-lua_script_DATA = base.lua \
- $(NULL)
+EXTRA_DIST = \
+ base.lua \
+ test.lua \
+ $(NULL)
+
+lua_script_DATA = \
+ base.lua \
+ $(NULL)
lua_scriptdir = $(pkgdatadir)
@@ -45,11 +51,11 @@ libpylua_la_LIBADD = \
$(NULL)
TESTS = \
- lua-ext-console \
test-lua-plugin \
$(NULL)
noinst_PROGRAMS = \
+ lua-ext-console \
$(TESTS) \
$(NULL)
@@ -60,6 +66,7 @@ test_lua_plugin_SOURCES = \
test_lua_plugin_CFLAGS = \
@IBUS_CFLAGS@ \
@LUA_CFLAGS@ \
+ -DLUASCRIPTDIR=\"$(top_srcdir)/lua\" \
$(NULL)
test_lua_plugin_LDADD = \
diff --git a/lua/test-lua-plugin.c b/lua/test-lua-plugin.c
index ac5ef62..e1a89e4 100644
--- a/lua/test-lua-plugin.c
+++ b/lua/test-lua-plugin.c
@@ -33,7 +33,7 @@ int main(int argc, char * argv[]){
IBusEnginePlugin * plugin;
plugin = ibus_engine_plugin_new();
- ibus_engine_plugin_load_lua_script(plugin, "test.lua");
+ ibus_engine_plugin_load_lua_script(plugin, LUASCRIPTDIR G_DIR_SEPARATOR_S "test.lua");
g_object_unref(plugin);
diff --git a/src/Makefile.am b/src/Makefile.am
index 6980ec9..9490ee0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -142,7 +142,7 @@ if IBUS_BUILD_LUA_EXTENSION
ibus_engine_pinyin_CXXFLAGS += \
@LUA_CFLAGS@ \
-DIBUS_BUILD_LUA_EXTENSION \
- -I../lua/ \
+ -I$(top_srcdir)/lua/ \
$(NULL)
endif