ctdb-build: Move internal include files in a separate directory
[samba.git] / ctdb / Makefile.in
index 4fed9a7a042b82d7a2e040f780523d08b2341402..f3cd70c3bdba0d45db06d985eb45ad7d4c618c3e 100755 (executable)
@@ -62,7 +62,8 @@ ifeq ($(CC),gcc)
 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\" \
@@ -120,7 +121,7 @@ TEST_BINS=tests/bin/ctdb_bench tests/bin/ctdb_fetch tests/bin/ctdb_fetch_one \
        @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
 
@@ -158,6 +159,9 @@ $(CTDB_VERSION_H):
        @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)
@@ -178,6 +182,10 @@ bin/ctdb_lock_helper: server/ctdb_lock_helper.o lib/util/util_file.o $(CTDB_EXTE
        @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)
@@ -311,6 +319,7 @@ distclean: clean
        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
@@ -322,6 +331,9 @@ install: all manpages $(PMDA_INSTALL)
        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)
@@ -329,6 +341,7 @@ install: all manpages $(PMDA_INSTALL)
        $(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)
@@ -367,9 +380,15 @@ install: all manpages $(PMDA_INSTALL)
        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
@@ -386,6 +405,9 @@ install_pmda:
 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