fixes error when make distcheck.
authorPeng Wu <alexepico@gmail.com>
Wed, 14 Jul 2010 05:40:53 +0000 (13:40 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 14 Jul 2010 05:40:53 +0000 (13:40 +0800)
lua/Makefile.am
lua/test-lua-plugin.c
src/Makefile.am

index e38c14c..f75244f 100644 (file)
 # 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 = \
index ac5ef62..e1a89e4 100644 (file)
@@ -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);
 
index 6980ec9..9490ee0 100644 (file)
@@ -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