diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-08-22 01:45:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:16:23 -0500 |
commit | 9a883a6336e65c0f0df8507f88779fc2a895f880 (patch) | |
tree | 9e374232b1d96b8ffe378025db9771cc8c1498b1 /source4/lib | |
parent | 35817c01a87f4bda0f492144a56d39a99bc07eb1 (diff) | |
download | samba-9a883a6336e65c0f0df8507f88779fc2a895f880.tar.gz samba-9a883a6336e65c0f0df8507f88779fc2a895f880.tar.bz2 samba-9a883a6336e65c0f0df8507f88779fc2a895f880.zip |
r17680: make standalone tdb support building and testing in a different
directory to source
(This used to be commit a81a3874e1a40131cbba22d14d7b68fd0f5b54c5)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/tdb/Makefile.in | 19 | ||||
-rw-r--r-- | source4/lib/tdb/configure.in | 2 |
2 files changed, 16 insertions, 5 deletions
diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in index 1c23aaeea7..849d0bd7c9 100644 --- a/source4/lib/tdb/Makefile.in +++ b/source4/lib/tdb/Makefile.in @@ -2,24 +2,33 @@ # Makefile for tdb directory # -CFLAGS = -Iinclude @CFLAGS@ CC = @CC@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ includedir = @includedir@ libdir = @libdir@ +VPATH = @srcdir@ +srcdir = @srcdir@ +builddir = @builddir@ +CFLAGS = -I$(srcdir)/include @CFLAGS@ PROGS = bin/tdbtool bin/tdbtorture TDB_OBJ = common/tdb.o common/dump.o common/io.o common/lock.o \ common/open.o common/traverse.o common/freelist.o common/error.o \ common/transaction.o -all: $(PROGS) +DIRS = lib bin common tools examples + +all: dirs $(PROGS) .c.o: @echo Compiling $*.c - @$(CC) $(CFLAGS) -c $< -o $@ + @mkdir -p `dirname $@` + $(CC) $(CFLAGS) -c $< -o $@ + +dirs: + @mkdir -p $(DIRS) install: all mkdir -p $(bindir) @@ -27,8 +36,8 @@ install: all mkdir -p $(libdir) mkdir -p $(libdir)/pkgconfig cp $(PROGS) $(bindir) - cp include/tdb.h $(includedir) - cp tdb.pc $(libdir)/pkgconfig + cp $(srcdir)/include/tdb.h $(includedir) + cp $(srcdir)/tdb.pc $(libdir)/pkgconfig bin/tdbtest: tools/tdbtest.o $(TDB_OBJ) $(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o $(TDB_OBJ) -lgdbm diff --git a/source4/lib/tdb/configure.in b/source4/lib/tdb/configure.in index 0a72af20d9..b067940781 100644 --- a/source4/lib/tdb/configure.in +++ b/source4/lib/tdb/configure.in @@ -1,7 +1,9 @@ +AC_PREREQ(2.50) AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""]) AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""]) AC_DEFUN([SMB_ENABLE], [echo -n ""]) AC_INIT(include/tdb.h) +AC_CONFIG_SRCDIR([common/tdb.c]) AC_CONFIG_HEADER(include/config.h) AC_PROG_CC AC_SYS_LARGEFILE |