This commit is contained in:
Axel Kittenberger 2010-11-13 08:50:30 +00:00
parent 9aa3ad8e44
commit 830bade7a4
2 changed files with 11 additions and 2 deletions

View File

@ -5,7 +5,14 @@ lsyncd_SOURCES = lsyncd.c
lsyncd_LDADD = $(LIBLUA_LIBS)
if RUNNER
# installs the runner
runnerdir = $(RUNNER_DIR)
runner_DATA = lsyncd.lua
else
# or compiles it into the binary
lsyncd: luac.o $(lsyncd_LDADD)
architecture: | lsyncd.o
@ -16,5 +23,6 @@ luac.o: luac.out architecture
luac.out: lsyncd.lua
luac $<
endif

View File

@ -15,10 +15,11 @@ PKG_CHECK_MODULES(LIBLUA, lua5.1)
AC_CHECK_HEADERS([sys/inotify.h])
AC_ARG_WITH([runner],
[ --with-runner=<file> Specify place where lsyncds part written in Lua will be placed.
[ --with-runner=<dir> Specify directory where lsyncds part written in Lua will be placed.
If missing it will be compiled into the binary)])
if test "x${with_runner}" != x; then
AC_DEFINE_UNQUOTED(LSYNCD_DEFAULT_RUNNER_FILE, "${with_runner}", "descr")
AC_DEFINE_UNQUOTED(LSYNCD_DEFAULT_RUNNER_FILE, "${with_runner}/lsyncd.lua", "descr")
AC_SUBST(RUNNER_DIR, "${with_runner}")
fi
AM_CONDITIONAL([RUNNER], [test x${with_runner} != x])