summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/Makefile.in
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-22 01:32:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:22 -0500
commit35817c01a87f4bda0f492144a56d39a99bc07eb1 (patch)
tree6495a245745b48a3b9fffb13934a0681aacfae1d /source4/lib/ldb/Makefile.in
parent862ba2617205832d4d5f0db07c54c4cc436a0f3d (diff)
downloadsamba-35817c01a87f4bda0f492144a56d39a99bc07eb1.tar.gz
samba-35817c01a87f4bda0f492144a56d39a99bc07eb1.tar.bz2
samba-35817c01a87f4bda0f492144a56d39a99bc07eb1.zip
r17679: - fix 'make test-ldap' to skip ldb specials
- allow ldb to be built in a separate build directory, using: /some/path/to/ldb/configure make this will make it much easier to put ldb in the build farm without interfering with the build farm builds of tdb and talloc (This used to be commit 580ed6730d33bad62e9799a38377c40f2852ae89)
Diffstat (limited to 'source4/lib/ldb/Makefile.in')
-rw-r--r--source4/lib/ldb/Makefile.in76
1 files changed, 40 insertions, 36 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index 817eba91d7..d3766962d3 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -8,6 +8,9 @@ includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
mandir = @mandir@
+VPATH = @srcdir@:@srcdir@/..
+srcdir = @srcdir@
+builddir = @builddir@
WITH_GCOV = @WITH_GCOV@
WITH_LDAP = @WITH_LDAP@
WITH_SQLITE3 = @WITH_SQLITE3@
@@ -16,22 +19,19 @@ ifeq ($(WITH_LDAP),yes)
OPENLDAP_PREFIX=/usr
LDAP_LIBS=-L$(OPENLDAP_PREFIX)/lib -llber -lldap
LDAP_FLAGS=-DHAVE_LDAP=1
-LDB_LDAP_OBJ=ldb_ldap/ldb_ldap.o
+LDB_LDAP_OBJ=$(srcdir)/ldb_ldap/ldb_ldap.o
endif
ifeq ($(WITH_SQLITE3),yes)
SQLITE3_PREFIX=/usr
SQLITE3_LIBS=-L$(SQLITE3_PREFIX)/lib -lsqlite3
SQLITE3_FLAGS=-DHAVE_SQLITE3=1
-LDB_SQLITE3_OBJ=ldb_sqlite3/ldb_sqlite3.o
+LDB_SQLITE3_OBJ=$(srcdir)/ldb_sqlite3/ldb_sqlite3.o
endif
-TDBDIR=../tdb
-TALLOCDIR=../talloc
-
CFLAGS1=-Wall -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
- -Wcast-qual -Wcast-align -Wwrite-strings -g -Iinclude -I. -I.. \
- -I$(TDBDIR)/include -I$(TALLOCDIR) -DUSE_MMAP=1 $(LDAP_FLAGS)
+ -Wcast-qual -Wcast-align -Wwrite-strings -g -I$(srcdir)/include -I$(srcdir) -I$(srcdir)/.. \
+ -I$(srcdir)/../tdb/include -I$(srcdir)/../tdb -I$(srcdir)/../talloc -DUSE_MMAP=1 $(LDAP_FLAGS)
# enable the following two lines to build with gcov code coverage support
ifeq ($(WITH_GCOV),1)
@@ -43,26 +43,32 @@ CFLAGS = $(CFLAGS1) $(GCOV_FLAGS) @CFLAGS@
LIB_FLAGS=-Llib -lldb $(LDAP_LIBS) $(SQLITE3_LIBS) $(GCOV_LIBS) @LIBS@
+TDBDIR=tdb
TDB_OBJ=$(TDBDIR)/common/tdb.o $(TDBDIR)/common/dump.o \
$(TDBDIR)/common/io.o $(TDBDIR)/common/lock.o \
$(TDBDIR)/common/open.o $(TDBDIR)/common/traverse.o \
$(TDBDIR)/common/freelist.o $(TDBDIR)/common/error.o \
$(TDBDIR)/common/transaction.o
+
+TALLOCDIR=talloc
TALLOC_OBJ=$(TALLOCDIR)/talloc.o
-LDB_TDB_OBJ=ldb_tdb/ldb_tdb.o \
- ldb_tdb/ldb_pack.o ldb_tdb/ldb_search.o ldb_tdb/ldb_index.o \
- ldb_tdb/ldb_cache.o ldb_tdb/ldb_tdb_wrap.o
+LDB_TDB_DIR=ldb_tdb
+LDB_TDB_OBJ=$(LDB_TDB_DIR)/ldb_tdb.o \
+ $(LDB_TDB_DIR)/ldb_pack.o $(LDB_TDB_DIR)/ldb_search.o $(LDB_TDB_DIR)/ldb_index.o \
+ $(LDB_TDB_DIR)/ldb_cache.o $(LDB_TDB_DIR)/ldb_tdb_wrap.o
-COMMON_OBJ=common/ldb.o common/ldb_ldif.o \
- common/ldb_parse.o common/ldb_msg.o common/ldb_utf8.o \
- common/ldb_debug.o common/ldb_modules.o \
- common/ldb_dn.o common/ldb_match.o common/ldb_attributes.o \
- common/attrib_handlers.o common/ldb_controls.o common/qsort.o
+COMDIR=common
+COMMON_OBJ=$(COMDIR)/ldb.o $(COMDIR)/ldb_ldif.o \
+ $(COMDIR)/ldb_parse.o $(COMDIR)/ldb_msg.o $(COMDIR)/ldb_utf8.o \
+ $(COMDIR)/ldb_debug.o $(COMDIR)/ldb_modules.o \
+ $(COMDIR)/ldb_dn.o $(COMDIR)/ldb_match.o $(COMDIR)/ldb_attributes.o \
+ $(COMDIR)/attrib_handlers.o $(COMDIR)/ldb_controls.o $(COMDIR)/qsort.o
-MODULES_OBJ=modules/operational.o modules/schema.o modules/rdn_name.o \
- modules/objectclass.o \
- modules/paged_results.o modules/sort.o modules/asq.o
+MODDIR=modules
+MODULES_OBJ=$(MODDIR)/operational.o $(MODDIR)/schema.o $(MODDIR)/rdn_name.o \
+ $(MODDIR)/objectclass.o \
+ $(MODDIR)/paged_results.o $(MODDIR)/sort.o $(MODDIR)/asq.o
OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LDAP_OBJ) $(LDB_SQLITE3_OBJ)
@@ -72,23 +78,21 @@ BINS = bin/ldbadd bin/ldbsearch bin/ldbdel bin/ldbmodify bin/ldbedit bin/ldbrena
LIBS = $(LDB_LIB)($(OBJS))
-DIRS = lib bin
-
MANPAGES = $(patsubst %.xml,%,$(wildcard man/*.xml))
EXAMPLES = examples/ldbreader examples/ldifreader
-all: $(DIRS) $(BINS) $(LIBS) $(EXAMPLES) $(MANPAGES) doxygen
+DIRS = lib bin common ldb_tdb ldb_ldap ldb_sqlite3 modules tools examples tdb talloc
+
+all: dirs $(BINS) $(LIBS) $(EXAMPLES) $(MANPAGES) doxygen
.c.o:
@echo Compiling $*.c
+ @mkdir -p `dirname $@`
@$(CC) $(CFLAGS) -c $< -o $@
-lib:
- mkdir -p lib
-
-bin:
- mkdir -p bin
+dirs: $(DIRS)
+ mkdir -p $(DIRS)
lib/libldb.a: $(OBJS)
@@ -157,12 +161,12 @@ etags:
test-tdb: $(BINS)
@echo "STARTING TDB BACKEND TEST"
- tests/test-tdb.sh
+ $(srcdir)/tests/test-tdb.sh
ifeq ($(WITH_LDAP),yes)
test-ldap:
@echo "STARTING LDAP BACKEND TEST"
- tests/test-ldap.sh
+ $(srcdir)/tests/test-ldap.sh
else
test-ldap:
@echo "SKIP LDAP TEST - NO LDAP SUPPORT"
@@ -171,7 +175,7 @@ endif
ifeq ($(WITH_SQLITE3),yes)
test-sqlite3:
@echo "STARTING SQLITE3 BACKEND TEST"
- tests/test-sqlite3.sh
+ $(srcdir)/tests/test-sqlite3.sh
else
test-sqlite3:
@echo "SKIP SQLITE3 TEST - NO SQLITE3 SUPPORT"
@@ -180,7 +184,7 @@ endif
ifeq (1,0)
test-schema:
@echo "STARTING SCHEMA MODULE TEST"
- tests/test-schema.sh
+ $(srcdir)/tests/test-schema.sh
else
test-schema:
@echo "SKIPPING SCHEMA MODULE TEST"
@@ -198,12 +202,12 @@ install: all
cp $(filter %.3, $(MANPAGES)) $(mandir)/man3
gcov:
- $(GCOV) -po ldb_sqlite3 ldb_sqlite3/*.c 2| tee ldb_sqlite3.report.gcov
- $(GCOV) -po ldb_ldap ldb_ldap/*.c 2| tee ldb_ldap.report.gcov
- $(GCOV) -po ldb_tdb ldb_tdb/*.c 2| tee ldb_tdb.report.gcov
- $(GCOV) -po common common/*.c 2| tee common.report.gcov
- $(GCOV) -po modules modules/*.c 2| tee modules.report.gcov
- $(GCOV) -po tools tools/*.c 2| tee tools.report.gcov
+ $(GCOV) -po ldb_sqlite3 $(srcdir)/ldb_sqlite3/*.c 2| tee ldb_sqlite3.report.gcov
+ $(GCOV) -po ldb_ldap $(srcdir)/ldb_ldap/*.c 2| tee ldb_ldap.report.gcov
+ $(GCOV) -po ldb_tdb $(srcdir)/ldb_tdb/*.c 2| tee ldb_tdb.report.gcov
+ $(GCOV) -po common $(srcdir)/common/*.c 2| tee common.report.gcov
+ $(GCOV) -po modules $(srcdir)/modules/*.c 2| tee modules.report.gcov
+ $(GCOV) -po tools $(srcdir)/tools/*.c 2| tee tools.report.gcov
ctags:
ctags `find $(srcdir) -name "*.[ch]"`