mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-07 09:04:05 +00:00
changed asciidoc generation to a2x. removed currently broken feature --with-default-runner. preparing 2.0.7
This commit is contained in:
parent
c890726c6e
commit
1847fd7cd4
16
Makefile.am
16
Makefile.am
@ -34,20 +34,12 @@ dist_man1_MANS = doc/lsyncd.1
|
|||||||
EXTRA_DIST = doc/lsyncd.1.txt doc/lsyncd.1.xml inotify.c fsevents.c bin2carray.lua \
|
EXTRA_DIST = doc/lsyncd.1.txt doc/lsyncd.1.xml inotify.c fsevents.c bin2carray.lua \
|
||||||
default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
|
default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
|
||||||
|
|
||||||
doc/lsyncd.1: doc/lsyncd.1.xml
|
doc/lsyncd.1: doc/lsyncd.1.txt
|
||||||
xsltproc -o $@ -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $<
|
a2x --format=manpage $<
|
||||||
|
|
||||||
doc/lsyncd.1.xml: doc/lsyncd.1.txt
|
|
||||||
asciidoc -o $@ -b docbook -d manpage $<
|
|
||||||
|
|
||||||
CLEANFILES = runner.out defaults.out runner.c defaults.c
|
CLEANFILES = runner.out defaults.out runner.c defaults.c
|
||||||
|
|
||||||
if RUNNER
|
# compiles the runner and the defaults into the binary
|
||||||
# installs the runner script
|
|
||||||
runnerdir = $(RUNNER_DIR)
|
|
||||||
runner_DATA = lsyncd.lua
|
|
||||||
else
|
|
||||||
# or compiles it into the binary
|
|
||||||
lsyncd_LDADD += runner.o defaults.o
|
lsyncd_LDADD += runner.o defaults.o
|
||||||
|
|
||||||
runner.o: runner.c
|
runner.o: runner.c
|
||||||
@ -65,5 +57,3 @@ runner.out: lsyncd.lua
|
|||||||
defaults.out: default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
|
defaults.out: default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
|
||||||
luac -o $@ $^
|
luac -o $@ $^
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
21
configure.ac
21
configure.ac
@ -1,7 +1,7 @@
|
|||||||
# -*- Autoconf -*-
|
# -*- Autoconf -*-
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
#AC_PREREQ(2.60)
|
#AC_PREREQ(2.60)
|
||||||
AC_INIT(lsyncd, 2.0.6, axkibe@gmail.com)
|
AC_INIT(lsyncd, 2.0.7, axkibe@gmail.com)
|
||||||
AC_CONFIG_SRCDIR([lsyncd.c])
|
AC_CONFIG_SRCDIR([lsyncd.c])
|
||||||
AC_CONFIG_HEADER([config.h])
|
AC_CONFIG_HEADER([config.h])
|
||||||
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||||
@ -24,21 +24,6 @@ PKG_CHECK_MODULES([LUA], [lua >= 5.1.3])
|
|||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([sys/inotify.h])
|
AC_CHECK_HEADERS([sys/inotify.h])
|
||||||
|
|
||||||
###
|
|
||||||
# --with-runner option
|
|
||||||
AC_ARG_WITH([runner],
|
|
||||||
[ --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}/lsyncd.lua", "descr")
|
|
||||||
AC_SUBST(RUNNER_DIR, "${with_runner}")
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL([RUNNER], [test x${with_runner} != x])
|
|
||||||
|
|
||||||
## NOTE:
|
|
||||||
## With this release Lsyncd can yet only do with inotify.
|
|
||||||
## enabling fsevents and disabling inotify is thus commented out.
|
|
||||||
|
|
||||||
###
|
###
|
||||||
# --without-inotify option
|
# --without-inotify option
|
||||||
AC_ARG_WITH([inotify],
|
AC_ARG_WITH([inotify],
|
||||||
@ -53,7 +38,7 @@ fi
|
|||||||
AM_CONDITIONAL([INOTIFY], [test x${with_inotify} != xno])
|
AM_CONDITIONAL([INOTIFY], [test x${with_inotify} != xno])
|
||||||
|
|
||||||
###
|
###
|
||||||
# --with-fsevents
|
# --with-fsevents
|
||||||
# disabled per default, experimental, works only with OS X 10.5/10.6
|
# disabled per default, experimental, works only with OS X 10.5/10.6
|
||||||
AC_ARG_WITH([fsevents],
|
AC_ARG_WITH([fsevents],
|
||||||
[ --with-fsevents Uses MacOS (10.5) /dev/fsevents. EXPERIMENTAL!
|
[ --with-fsevents Uses MacOS (10.5) /dev/fsevents. EXPERIMENTAL!
|
||||||
@ -62,7 +47,7 @@ if test "x${with_fsevents}" == xyes; then
|
|||||||
echo "compiling with fsevents. WARNING experimental!"
|
echo "compiling with fsevents. WARNING experimental!"
|
||||||
AC_DEFINE(LSYNCD_WITH_FSEVENTS,,"descr")
|
AC_DEFINE(LSYNCD_WITH_FSEVENTS,,"descr")
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([FSEVENTS],
|
AM_CONDITIONAL([FSEVENTS],
|
||||||
[test x${with_fsevents} != x -a xno${with_fsevents} != xno])
|
[test x${with_fsevents} != x -a xno${with_fsevents} != xno])
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
22
lsyncd.c
22
lsyncd.c
@ -47,10 +47,8 @@
|
|||||||
/**
|
/**
|
||||||
* The Lua part of lsyncd if compiled into the binary.
|
* The Lua part of lsyncd if compiled into the binary.
|
||||||
*/
|
*/
|
||||||
#ifndef LSYNCD_DEFAULT_RUNNER_FILE
|
extern const char runner_out[];
|
||||||
extern const char runner_out[];
|
extern size_t runner_size;
|
||||||
extern size_t runner_size;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern const char defaults_out[];
|
extern const char defaults_out[];
|
||||||
extern size_t defaults_size;
|
extern size_t defaults_size;
|
||||||
@ -1729,21 +1727,13 @@ main1(int argc, char *argv[])
|
|||||||
if (argp < argc && !strcmp(argv[argp], "--runner")) {
|
if (argp < argc && !strcmp(argv[argp], "--runner")) {
|
||||||
if (argp + 1 >= argc) {
|
if (argp + 1 >= argc) {
|
||||||
logstring("Error", "Lsyncd Lua-runner file missing after --runner.");
|
logstring("Error", "Lsyncd Lua-runner file missing after --runner.");
|
||||||
#ifdef LSYNCD_DEFAULT_RUNNER_FILE
|
|
||||||
printlogf(L, "Error",
|
|
||||||
"Using '%s' as default location for runner.", LSYNCD_DEFAULT_RUNNER_FILE);
|
|
||||||
#else
|
|
||||||
logstring("Error", "Using a statically included runner as default.");
|
logstring("Error", "Using a statically included runner as default.");
|
||||||
#endif
|
|
||||||
exit(-1); //ERRNO
|
exit(-1); //ERRNO
|
||||||
}
|
}
|
||||||
lsyncd_runner_file = argv[argp + 1];
|
lsyncd_runner_file = argv[argp + 1];
|
||||||
argp += 2;
|
argp += 2;
|
||||||
} else {
|
|
||||||
#ifdef LSYNCD_DEFAULT_RUNNER_FILE
|
|
||||||
lsyncd_runner_file = LSYNCD_DEFAULT_RUNNER_FILE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lsyncd_runner_file) {
|
if (lsyncd_runner_file) {
|
||||||
// checks if the runner file exists
|
// checks if the runner file exists
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@ -1761,17 +1751,11 @@ main1(int argc, char *argv[])
|
|||||||
exit(-1); // ERRNO
|
exit(-1); // ERRNO
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifndef LSYNCD_DEFAULT_RUNNER_FILE
|
|
||||||
// loads the runner from binary
|
// loads the runner from binary
|
||||||
if (luaL_loadbuffer(L, runner_out, runner_size, "runner")) {
|
if (luaL_loadbuffer(L, runner_out, runner_size, "runner")) {
|
||||||
printlogf(L, "Error", "loading precompiled runner: %s", lua_tostring(L, -1));
|
printlogf(L, "Error", "loading precompiled runner: %s", lua_tostring(L, -1));
|
||||||
exit(-1); // ERRNO
|
exit(-1); // ERRNO
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
// safeguard for what never ever should happen.
|
|
||||||
logstring("Error", "Internal fail: lsyncd_runner is NULL with non-static runner");
|
|
||||||
exit(-1); // ERRNO
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ if lsyncd_version then
|
|||||||
lsyncd.log('Error', 'You cannot use the lsyncd runner as configuration file!')
|
lsyncd.log('Error', 'You cannot use the lsyncd runner as configuration file!')
|
||||||
lsyncd.terminate(-1) -- ERRNO
|
lsyncd.terminate(-1) -- ERRNO
|
||||||
end
|
end
|
||||||
lsyncd_version = '2.0.6'
|
lsyncd_version = '2.0.7'
|
||||||
|
|
||||||
-----
|
-----
|
||||||
-- Hides the core interface from user scripts
|
-- Hides the core interface from user scripts
|
||||||
|
Loading…
Reference in New Issue
Block a user