Barak A. Pearlmutter

tweak autotools: $(wildcard ...) plays poorly with target dist

... ... @@ -57,6 +57,7 @@ tmp
/configure
/depcomp
/install-sh
/m4/
/missing
/stamp-h1
Makefile
... ...
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = examples
bin_PROGRAMS = clsync
clsync_SOURCES = sync.c cluster.c main.c error.c fileutils.c malloc.c glibex.c
clsync_CFLAGS = $(AM_CFLAGS)
... ... @@ -15,12 +18,6 @@ man_MANS = man/man1/clsync.1
doc_DATA = CONTRIB DEVELOPING LICENSE PROTOCOL README.md TODO
exampledir=$(docdir)/examples
example_DATA = \
$(wildcard $(srcdir)/examples/*.c) \
$(wildcard $(srcdir)/examples/*.sh)
REVISION=$(shell [ -d .git ] &&\
(echo -n \
'\".'$$(($$(git log 2>/dev/null \
... ... @@ -47,16 +44,9 @@ clsync_include_HEADERS = \
doc:
doxygen .doxygen
install-data-local:
if SOCKET
mkdir -p $(DESTDIR)/$(libdir)/pkgconfig
cp pkgconfig/*.pc $(DESTDIR)/$(libdir)/pkgconfig/
pkgconfig_DATA = pkgconfig/clsync.pc
endif
mkdir -p $(DESTDIR)/$(exampledir)
cp -R examples/production $(DESTDIR)/$(exampledir)/
uninstall-local:
rm -rf $(DESTDIR)/$(exampledir)/production
CLEANFILES = revision.h
CLEANFILES += examples/rules
... ...
... ... @@ -4,12 +4,15 @@
AC_PREREQ([2.59])
AC_INIT([clsync],[0.3],[Dmitry Yu Okunev <dyokunev@ut.mephi.ru>],,[https://github.com/xaionaro/clsync])
AC_CONFIG_SRCDIR([sync.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 foreign -Wall -Wno-portability])
AC_CONFIG_HEADERS([config.h])
AM_PROG_CC_C_O
LT_INIT
PKG_INSTALLDIR
dnl --enable-cluster
AC_ARG_ENABLE(cluster,
AS_HELP_STRING(--enable-cluster,
... ... @@ -107,5 +110,5 @@ AM_CPPFLAGS="${GLIB_CFLAGS}"
AC_SUBST(AM_CPPFLAGS)
AC_CONFIG_FILES([Makefile pkgconfig/clsync.pc])
AC_CONFIG_FILES([Makefile examples/Makefile pkgconfig/clsync.pc])
AC_OUTPUT
... ...
exampledir=$(docdir)/examples
# example_DATA = \
# $(wildcard $(srcdir)/*.c) \
# $(wildcard $(srcdir)/*.sh)
example_DATA = clsync-synchandler-rsyncso.c clsync-synchandler-so.c
example_SCRIPTS = clsync-start-cluster.sh clsync-start-rsyncdirect.sh \
clsync-start-rsyncshell.sh clsync-start-rsyncso.sh \
clsync-start-so.sh clsync-synchandler-rsyncshell.sh
# find production -type f -name '*.sh'
nobase_example_SCRIPTS = \
production/etc/clsync/hooks/lxc/exit-backup.sh \
production/etc/clsync/hooks/lxc/exit-brother.sh \
production/etc/clsync/synchandler/lxc/backup.sh \
production/etc/clsync/synchandler/lxc/brother.sh
# find production -type f -not -name '*.sh'
nobase_example_DATA = production/etc/clsync/rules/hpc \
production/etc/clsync/rules/hpc-backup \
production/etc/clsync/rules/lxc \
production/etc/clsync/synchandler/hpc/handler-backup.c \
production/etc/clsync/synchandler/hpc/handler-pdcp.c \
production/etc/clsync/synchandler/lxc/rsync.exclude \
production/etc/clsync/clsync.conf
... ...