build: compile and install lua libraries

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-13 13:26:41 +02:00
parent eb6b533557
commit c207bd0145
2 changed files with 13 additions and 1 deletions

View File

@ -53,6 +53,10 @@ EXTRA_DIST += awful.lua
EXTRA_DIST += tabulous.lua
dist_awesomelib_DATA += awful.lua
dist_awesomelib_DATA += tabulous.lua
dist_awesomelib_DATA += awful.luac
dist_awesomelib_DATA += tabulous.luac
CLEANFILES += awful.luac
CLEANFILES += tabulous.luac
EXTRA_DIST += awesomerc.lua.in
CLEANFILES += awesomerc.lua
@ -60,6 +64,10 @@ BUILT_SOURCES += awesomerc.lua
doc_DATA += awesomerc.lua
etc_DATA += awesomerc.lua
SUFFIXES += .lua .luac
.lua.luac:
$(LUAC) -s -o $@ $<
awesomerc.lua: $(srcdir)/awesomerc.lua.in
$(SED) -e "s|[@]iconslayoutsdir@|$(iconslayoutsdir)|;s|[@]iconsdir@|$(iconsdir)|" \
< $(srcdir)/awesomerc.lua.in > awesomerc.lua

View File

@ -109,7 +109,11 @@ AC_DEFINE_UNQUOTED([AWESOME_COMPILE_BY], ["$aw_whoami"], [build user])
AC_ARG_VAR([LUA], [Lua interpreter])
AC_PATH_PROG([LUA], [lua], [:])
test "x$LUA" = "x" && AC_MSG_WARN([awesome compilation requires Lua])
test "x$LUA" = "x" && AC_MSG_WARN([awesome compilation requires lua])
AC_ARG_VAR([LUAC], [Lua compiler])
AC_PATH_PROG([LUAC], [luac], [:])
test "x$LUAC" = "x" && AC_MSG_WARN([awesome compilation requires luac])
AS_AC_EXPAND(awesomelibdir, "$datarootdir/awesome/lib")
AC_DEFINE_UNQUOTED([AWESOME_LUA_LIB_PATH], "${awesomelibdir}", [awesome lib path])