new lua implementation.
[apps/madmutt.git] / lib-lua / Makefile.am
index 53f6997..b28c98d 100644 (file)
@@ -1,9 +1,21 @@
+BUILT_SOURCES    = lua-token.h lua-token.c
+DISTCLEANFILES   = $(BUILT_SOURCES)
+
+.cpkg.c: ; ./luapkg2c.pl -c $< > $@
+.cpkg.h: ; ./luapkg2c.pl -h $< > $@
+
 noinst_LIBRARIES = liblua.a
 
-liblua_a_SOURCES = lib-lua.h \
-                  runtime.c
+liblua_a_DEPENDENCIES = madmutt.h
+liblua_a_SOURCES = madmutt.cpkg \
+                  lib-lua.h lib-lua_priv.h \
+                  runtime.c \
+                  $(BUILT_SOURCES)
+
+noinst_HEADERS   = lib-lua.h lib-lua_priv.h
 
-noinst_HEADERS   = lib-lua.h
+lua-token.c lua-token.h: lua-token.sh
+       sh $< $@ || (rm -f $@; exit 1)
 
 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
        -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \