2010-10-14 13:52:01 +00:00
|
|
|
AUTOMAKE_OPTIONS = foreign
|
2010-11-29 15:01:24 +00:00
|
|
|
CFLAGS += -Wall $(LUA_CFLAGS)
|
2010-10-14 13:52:01 +00:00
|
|
|
bin_PROGRAMS = lsyncd
|
2010-11-26 16:17:36 +00:00
|
|
|
lsyncd_SOURCES = lsyncd.h lsyncd.c lsyncd.lua
|
|
|
|
if INOTIFY
|
|
|
|
lsyncd_SOURCES += inotify.c
|
|
|
|
endif
|
2010-11-28 10:47:57 +00:00
|
|
|
#if FANOTIFY
|
|
|
|
#lsyncd_SOURCES += fanotify.c
|
|
|
|
#endif
|
|
|
|
|
2010-11-26 16:52:24 +00:00
|
|
|
if FSEVENTS
|
|
|
|
lsyncd_SOURCES += fsevents.c
|
|
|
|
endif
|
2010-11-26 16:17:36 +00:00
|
|
|
|
2010-11-28 20:16:56 +00:00
|
|
|
lsyncd_LDADD = $(LUA_LIBS)
|
2010-11-14 14:13:15 +00:00
|
|
|
exampledir = $(datarootdir)/doc/@PACKAGE@
|
2010-11-14 19:53:36 +00:00
|
|
|
dist_example_DATA = \
|
2010-11-14 14:13:15 +00:00
|
|
|
examples/lbash.lua \
|
2010-11-17 19:21:11 +00:00
|
|
|
examples/lecho.lua \
|
|
|
|
examples/lgforce.lua \
|
2010-11-14 14:13:15 +00:00
|
|
|
examples/limagemagic.lua \
|
|
|
|
examples/lrsync.lua \
|
|
|
|
examples/lrsyncssh.lua
|
2010-11-17 13:58:31 +00:00
|
|
|
TESTS = tests/l4-rsync-data.sh
|
|
|
|
|
2010-11-27 23:28:44 +00:00
|
|
|
man1_MANS = doc/lsyncd.1
|
2010-10-26 20:29:12 +00:00
|
|
|
|
2010-11-27 23:28:44 +00:00
|
|
|
doc/lsyncd.1: doc/lsyncd.1.xml
|
|
|
|
xsltproc -o $@ -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $<
|
|
|
|
|
|
|
|
doc/lsyncd.1.xml: doc/lsyncd.1.txt
|
|
|
|
asciidoc -o $@ -b docbook -d manpage $<
|
2010-11-13 08:50:30 +00:00
|
|
|
|
2010-11-27 23:28:44 +00:00
|
|
|
if RUNNER
|
|
|
|
# installs the runner script
|
2010-11-13 08:50:30 +00:00
|
|
|
runnerdir = $(RUNNER_DIR)
|
|
|
|
runner_DATA = lsyncd.lua
|
2010-10-26 20:29:12 +00:00
|
|
|
else
|
2010-11-13 08:50:30 +00:00
|
|
|
# or compiles it into the binary
|
2010-11-22 20:09:52 +00:00
|
|
|
lsyncd_LDADD += luac.o
|
2010-10-26 20:29:12 +00:00
|
|
|
|
2010-11-17 13:58:31 +00:00
|
|
|
objarch: | lsyncd.o
|
|
|
|
objdump -f lsyncd.o | grep architecture | \
|
|
|
|
sed -e "s/,.*$$//" -e "s/[^ ]* \(.*\)/\1/" > $@ || rm $@
|
|
|
|
|
|
|
|
objtarget: | lsyncd.o
|
|
|
|
objdump -f lsyncd.o | grep "file format" | \
|
|
|
|
sed -e "s/.* \(.*\)/\1/" > $@ || rm $@
|
2010-10-26 20:29:12 +00:00
|
|
|
|
2010-11-17 13:58:31 +00:00
|
|
|
luac.o: luac.out objarch objtarget
|
|
|
|
objcopy --input-target=binary \
|
|
|
|
--output-target=`cat objtarget` \
|
|
|
|
--binary-architecture=`cat objarch` $< $@
|
2010-10-26 20:29:12 +00:00
|
|
|
|
|
|
|
luac.out: lsyncd.lua
|
|
|
|
luac $<
|
|
|
|
endif
|
|
|
|
|