EXTRA_CFLAGS=-Wno-format-zero-length -Wno-deprecated-declarations -fPIC
endif
-CFLAGS=@CPPFLAGS@ -g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
+CFLAGS=@CPPFLAGS@ -g -I$(srcdir)/include -I$(srcdir)/include/internal \
+ -Iinclude -Ilib -Ilib/util -I$(srcdir) \
$(TALLOC_CFLAGS) $(TEVENT_CFLAGS) $(TDB_CFLAGS) -I@libreplacedir@ \
-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
-DCTDB_VARDIR=\"$(localstatedir)/lib/ctdb\" \
@INFINIBAND_BINS@
BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify bin/ping_pong bin/ltdbtool \
- bin/ctdb_lock_helper @CTDB_PMDA@
+ bin/ctdb_lock_helper bin/ctdb_event_helper @CTDB_PMDA@
SBINS = bin/ctdbd
@echo Generating $@
$(WRAPPER) ./packaging/mkversion.sh
+server/ctdb_daemon.c: $(CTDB_VERSION_H)
+tools/ctdb.c: $(CTDB_VERSION_H)
+
bin/ctdbd: $(CTDB_SERVER_OBJ)
@echo Linking $@
$(WRAPPER) $(CC) $(CFLAGS) -o $@ $(CTDB_SERVER_OBJ) $(LIB_FLAGS)
@echo Linking $@
$(WRAPPER) $(CC) $(CFLAGS) -o $@ server/ctdb_lock_helper.o lib/util/util_file.o $(CTDB_EXTERNAL_OBJ) $(TDB_LIBS) $(LIB_FLAGS)
+bin/ctdb_event_helper: server/ctdb_event_helper.o $(REPLACE_OBJ) $(SOCKET_WRAPPER_OBJ)
+ @echo Linking $@
+ $(WRAPPER) $(CC) $(CFLAGS) -o $@ server/ctdb_event_helper.o $(REPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) $(LIB_FLAGS)
+
bin/smnotify: utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o utils/smnotify/smnotify.o $(POPT_OBJ)
@echo Linking $@
$(WRAPPER) $(CC) $(CFLAGS) -o $@ utils/smnotify/smnotify.o utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o $(POPT_OBJ) $(LIB_FLAGS)
rm -rf bin
rm -f config.log config.status config.cache config.h
rm -f Makefile
+ rm -f $(CTDB_VERSION_H)
install: all manpages $(PMDA_INSTALL)
mkdir -p $(DESTDIR)$(libdir)/pkgconfig
mkdir -p $(DESTDIR)$(etcdir)/ctdb/nfs-rpc-checks.d
mkdir -p $(DESTDIR)$(etcdir)/sudoers.d/
mkdir -p $(DESTDIR)$(etcdir)/ctdb/notify.d
+ mkdir -p $(DESTDIR)$(localstatedir)/lib/ctdb
+ mkdir -p $(DESTDIR)$(localstatedir)/run/ctdb
+ mkdir -p $(DESTDIR)$(logdir)
${INSTALLCMD} -m 644 ctdb.pc $(DESTDIR)$(libdir)/pkgconfig
${INSTALLCMD} -m 755 bin/ctdb $(DESTDIR)$(bindir)
${INSTALLCMD} -m 755 bin/ctdbd $(DESTDIR)$(sbindir)
$(INSTALLCMD) -m 755 bin/ping_pong $(DESTDIR)$(bindir)
$(INSTALLCMD) -m 755 bin/ltdbtool $(DESTDIR)$(bindir)
$(INSTALLCMD) -m 755 bin/ctdb_lock_helper $(DESTDIR)$(bindir)
+ $(INSTALLCMD) -m 755 bin/ctdb_event_helper $(DESTDIR)$(bindir)
${INSTALLCMD} -m 644 include/ctdb.h $(DESTDIR)$(includedir)
${INSTALLCMD} -m 644 include/ctdb_client.h $(DESTDIR)$(includedir)
${INSTALLCMD} -m 644 include/ctdb_protocol.h $(DESTDIR)$(includedir)
if [ -f doc/ctdb.1 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man1; fi
if [ -f doc/ctdb.1 ];then ${INSTALLCMD} -m 644 doc/ctdb.1 $(DESTDIR)$(mandir)/man1; fi
if [ -f doc/ctdbd.1 ];then ${INSTALLCMD} -m 644 doc/ctdbd.1 $(DESTDIR)$(mandir)/man1; fi
+ if [ -f doc/ctdbd_wrapper.1 ];then ${INSTALLCMD} -m 644 doc/ctdbd_wrapper.1 $(DESTDIR)$(mandir)/man1; fi
if [ -f doc/onnode.1 ];then ${INSTALLCMD} -m 644 doc/onnode.1 $(DESTDIR)$(mandir)/man1; fi
if [ -f doc/ltdbtool.1 ]; then ${INSTALLCMD} -m 644 doc/ltdbtool.1 $(DESTDIR)$(mandir)/man1; fi
if [ -f doc/ping_pong.1 ];then ${INSTALLCMD} -m 644 doc/ping_pong.1 $(DESTDIR)$(mandir)/man1; fi
+ if [ -f doc/ctdb.7 ]; then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man7; fi
+ if [ -f doc/ctdb.7 ]; then ${INSTALLCMD} -m 644 doc/ctdb.7 $(DESTDIR)$(mandir)/man7; fi
+ if [ -f doc/ctdb-tunables.7 ]; then ${INSTALLCMD} -m 644 doc/ctdb-tunables.7 $(DESTDIR)$(mandir)/man7; fi
+ if [ -f doc/ctdbd.conf.5 ]; then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man5; fi
+ if [ -f doc/ctdbd.conf.5 ]; then ${INSTALLCMD} -m 644 doc/ctdbd.conf.5 $(DESTDIR)$(mandir)/man5; fi
${INSTALLCMD} -m 755 config/notify.sh $(DESTDIR)$(etcdir)/ctdb
${INSTALLCMD} -m 755 config/debug-hung-script.sh $(DESTDIR)$(etcdir)/ctdb
${INSTALLCMD} -m 755 config/ctdb-crash-cleanup.sh $(DESTDIR)$(etcdir)/ctdb
install_tests: all
tests/INSTALL --destdir=$(DESTDIR) --datarootdir=$(prefix)/share --libdir=$(libdir) --bindir=$(bindir) --etcdir=$(etcdir)
+autotest: all
+ tests/run_tests.sh -e -S -C
+
test: all
tests/run_tests.sh -V tests/var