diff options
author | Simo Sorce <idra@samba.org> | 2008-09-19 15:15:46 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-09-19 18:07:53 -0400 |
commit | 3235e25425dddb9ba6d0f8d7cfff94ea9d7c5bdd (patch) | |
tree | ac046a584fadc482e36e806222384f9ccb1473d1 | |
parent | e07400525fd955b9fb9524edda3f8e6bc7567847 (diff) | |
download | samba-3235e25425dddb9ba6d0f8d7cfff94ea9d7c5bdd.tar.gz samba-3235e25425dddb9ba6d0f8d7cfff94ea9d7c5bdd.tar.bz2 samba-3235e25425dddb9ba6d0f8d7cfff94ea9d7c5bdd.zip |
Add shared-build target to tdb.
Useful to build multiple standalone libraries that depend on each other
without having to install them to the final install dir during the build.
-rw-r--r-- | lib/tdb/Makefile.in | 11 | ||||
-rw-r--r-- | lib/tdb/build_macros.m4 | 14 | ||||
-rw-r--r-- | lib/tdb/configure.ac | 4 | ||||
-rw-r--r-- | lib/tdb/include/tdb.h | 1 |
4 files changed, 30 insertions, 0 deletions
diff --git a/lib/tdb/Makefile.in b/lib/tdb/Makefile.in index 090bb6e2dc..9915d88264 100644 --- a/lib/tdb/Makefile.in +++ b/lib/tdb/Makefile.in @@ -12,6 +12,8 @@ libdir = @libdir@ VPATH = @srcdir@:@libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ +sharedbuilddir = @sharedbuilddir@ +INSTALLCMD = @INSTALL@ CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude CFLAGS = $(CPPFLAGS) @CFLAGS@ LDFLAGS = @LDFLAGS@ @@ -43,6 +45,15 @@ install:: all $(TDB_SOLIB): $(TDB_OBJ) $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(TDB_SONAME) +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libtdb.a $(sharedbuilddir)/lib + ${INSTALLCMD} -m 755 $(TDB_SOLIB) $(sharedbuilddir)/lib + ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/$(TDB_SONAME) + ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/libtdb.so + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 $(srcdir)/include/tdb.h $(sharedbuilddir)/include + check: test test:: $(PYTHON_CHECK_TARGET) diff --git a/lib/tdb/build_macros.m4 b/lib/tdb/build_macros.m4 new file mode 100644 index 0000000000..c036668cd1 --- /dev/null +++ b/lib/tdb/build_macros.m4 @@ -0,0 +1,14 @@ +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) + + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" + fi + AC_SUBST(sharedbuilddir) + ]) + diff --git a/lib/tdb/configure.ac b/lib/tdb/configure.ac index eaf70d30b4..4bf2e98e8f 100644 --- a/lib/tdb/configure.ac +++ b/lib/tdb/configure.ac @@ -27,4 +27,8 @@ if test -z "$PYTHON_CONFIG"; then PYTHON_INSTALL_TARGET="" PYTHON_CHECK_TARGET="" fi + +m4_include(build_macros.m4) +BUILD_WITH_SHARED_BUILD_DIR + AC_OUTPUT(Makefile tdb.pc) diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h index 0008085de5..c41c9941f0 100644 --- a/lib/tdb/include/tdb.h +++ b/lib/tdb/include/tdb.h @@ -30,6 +30,7 @@ extern "C" { #endif +#include "signal.h" /* flags to tdb_store() */ #define TDB_REPLACE 1 /* Unused */ |