1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

tdb: Remove autotools support.

This commit is contained in:
Jelmer Vernooij 2010-12-23 23:54:51 +01:00
parent 0f8f21657d
commit 9e8a049843
17 changed files with 98 additions and 3847 deletions

64
lib/tdb/Makefile Normal file
View File

@ -0,0 +1,64 @@
# simple makefile wrapper to run waf
WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf
all:
$(WAF) build
install:
$(WAF) install
uninstall:
$(WAF) uninstall
test:
$(WAF) test $(TEST_OPTIONS)
testenv:
$(WAF) test --testenv $(TEST_OPTIONS)
quicktest:
$(WAF) test --quick $(TEST_OPTIONS)
dist:
$(WAF) dist
distcheck:
$(WAF) distcheck
clean:
$(WAF) clean
distclean:
$(WAF) distclean
reconfigure: configure
$(WAF) reconfigure
show_waf_options:
$(WAF) --help
# some compatibility make targets
everything: all
testsuite: all
check: test
torture: all
# this should do an install as well, once install is finished
installcheck: test
etags:
$(WAF) etags
ctags:
$(WAF) ctags
pydoctor:
$(WAF) pydoctor
bin/%:: FORCE
$(WAF) --targets=`basename $@`
FORCE:

View File

@ -1,80 +0,0 @@
#!gmake
#
# Makefile for tdb directory
#
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
mandir = @mandir@
VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
sharedbuilddir = @sharedbuilddir@
INSTALLCMD = @INSTALL@
CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude
CFLAGS = $(CPPFLAGS) @CFLAGS@
LDFLAGS = @LDFLAGS@
EXEEXT = @EXEEXT@
SHLD = @SHLD@
SHLD_FLAGS = @SHLD_FLAGS@
PACKAGE_VERSION = @PACKAGE_VERSION@
PICFLAG = @PICFLAG@
SHLIBEXT = @SHLIBEXT@
PYTHON = @PYTHON@
PYTHON_CONFIG = @PYTHON_CONFIG@
PYTHON_BUILD_TARGET = @PYTHON_BUILD_TARGET@
PYTHON_INSTALL_TARGET = @PYTHON_INSTALL_TARGET@
PYTHON_CHECK_TARGET = @PYTHON_CHECK_TARGET@
LIB_PATH_VAR = @LIB_PATH_VAR@
tdbdir = @tdbdir@
EXTRA_TARGETS = @DOC_TARGET@
TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@
TDB_DEPS = @TDB_DEPS@
SONAMEFLAG = @SONAMEFLAG@
VERSIONSCRIPT = @VERSIONSCRIPT@
EXPORTSFILE = @EXPORTSFILE@
XSLTPROC = @XSLTPROC@
default: all
include $(tdbdir)/tdb.mk
include $(tdbdir)/rules.mk
all:: showflags dirs $(PROGS) $(TDB_SOLIB) libtdb.a $(PYTHON_BUILD_TARGET) $(EXTRA_TARGETS)
install:: all
$(TDB_SOLIB): $(TDB_OBJ)
$(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) $(VERSIONSCRIPT) $(EXPORTSFILE) $(TDB_DEPS) $(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)
installcheck:: test install
clean::
rm -f *.o *.a */*.o
rm -fr abi
distclean:: clean
rm -f config.log config.status include/config.h config.cache
rm -f Makefile
realdistclean:: distclean
rm -f configure include/config.h.in

1
lib/tdb/aclocal.m4 vendored
View File

@ -1 +0,0 @@
m4_include(libreplace.m4)

View File

@ -1,14 +0,0 @@
#!/bin/sh
rm -rf autom4te.cache
rm -f configure config.h.in
IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace"
autoconf $IPATHS || exit 1
autoheader $IPATHS || exit 1
rm -rf autom4te.cache
echo "Now run ./configure and then make."
exit 0

View File

@ -1 +0,0 @@
../../buildtools/scripts/autogen-waf.sh

View File

@ -1 +0,0 @@
autogen-waf.sh

11
lib/tdb/autogen.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
p=`dirname $0`
echo "Setting up for waf build"
echo "done. Now run $p/configure then make."
if [ $p != "." ]; then
echo "Notice: The build invoke path is not the main directory! Use make with the parameter"
echo "-C $p. Example: make -C $p all"
fi

View File

@ -1,14 +0,0 @@
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)
])

1561
lib/tdb/config.guess vendored

File diff suppressed because it is too large Load Diff

1686
lib/tdb/config.sub vendored

File diff suppressed because it is too large Load Diff

21
lib/tdb/configure vendored Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
PREVPATH=`dirname $0`
if [ -f $PREVPATH/../../buildtools/bin/waf ]; then
WAF=../../buildtools/bin/waf
elif [ -f $PREVPATH/buildtools/bin/waf ]; then
WAF=./buildtools/bin/waf
else
echo "replace: Unable to find waf"
exit 1
fi
# using JOBS=1 gives maximum compatibility with
# systems like AIX which have broken threading in python
JOBS=1
export JOBS
cd . || exit 1
$WAF configure "$@" || exit 1
cd $PREVPATH

View File

@ -1,51 +0,0 @@
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(tdb, 1.2.6)
AC_CONFIG_SRCDIR([common/tdb.c])
AC_CONFIG_HEADER(include/config.h)
AC_LIBREPLACE_ALL_CHECKS
AC_LD_SONAMEFLAG
AC_LD_VERSIONSCRIPT
AC_LD_PICFLAG
AC_LD_SHLIBEXT
AC_LIBREPLACE_SHLD
AC_LIBREPLACE_SHLD_FLAGS
AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
m4_include(libtdb.m4)
AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
PYTHON_BUILD_TARGET="build-python"
PYTHON_INSTALL_TARGET="install-python"
PYTHON_CHECK_TARGET="check-python"
AC_SUBST(PYTHON_BUILD_TARGET)
AC_SUBST(PYTHON_INSTALL_TARGET)
AC_SUBST(PYTHON_CHECK_TARGET)
if test -z "$PYTHON_CONFIG"; then
PYTHON_BUILD_TARGET=""
PYTHON_INSTALL_TARGET=""
PYTHON_CHECK_TARGET=""
fi
AC_ARG_ENABLE(python,
AS_HELP_STRING([--enable-python], [Enables python binding]),
[ if test "x$enableval" = "xno" ; then
PYTHON_BUILD_TARGET=""
PYTHON_INSTALL_TARGET=""
PYTHON_CHECK_TARGET=""
fi
])
AC_PATH_PROG(XSLTPROC,xsltproc)
DOC_TARGET=""
if test -n "$XSLTPROC"; then
DOC_TARGET=doc
fi
AC_SUBST(DOC_TARGET)
m4_include(build_macros.m4)
BUILD_WITH_SHARED_BUILD_DIR
AC_OUTPUT(Makefile tdb.pc)

View File

@ -1,238 +0,0 @@
#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -1,6 +0,0 @@
[PYTHON::pytdb]
LIBRARY_REALNAME = tdb.$(SHLIBEXT)
PUBLIC_DEPENDENCIES = LIBTDB DYNCONFIG
pytdb_OBJ_FILES = $(tdbsrcdir)/pytdb.o

View File

@ -1,16 +0,0 @@
showflags::
@echo 'tdb will be compiled with flags:'
@echo ' CFLAGS = $(CFLAGS)'
@echo ' CPPFLAGS = $(CPPFLAGS)'
@echo ' LDFLAGS = $(LDFLAGS)'
@echo ' LIBS = $(LIBS)'
.SUFFIXES: .c .o
.c.o:
@echo Compiling $*.c
@mkdir -p `dirname $@`
@$(CC) $(PICFLAG) $(CFLAGS) $(ABI_CHECK) -c $< -o $@
distclean::
rm -f *~ */*~

View File

@ -1,65 +0,0 @@
{
global:
tdb_add_flags;
tdb_append;
tdb_chainlock;
tdb_chainlock_mark;
tdb_chainlock_nonblock;
tdb_chainlock_read;
tdb_chainlock_unmark;
tdb_chainunlock;
tdb_chainunlock_read;
tdb_check;
tdb_close;
tdb_delete;
tdb_dump_all;
tdb_enable_seqnum;
tdb_error;
tdb_errorstr;
tdb_exists;
tdb_fd;
tdb_fetch;
tdb_firstkey;
tdb_freelist_size;
tdb_get_flags;
tdb_get_logging_private;
tdb_get_seqnum;
tdb_hash_size;
tdb_increment_seqnum_nonblock;
tdb_lockall;
tdb_lockall_mark;
tdb_lockall_nonblock;
tdb_lockall_read;
tdb_lockall_read_nonblock;
tdb_lockall_unmark;
tdb_log_fn;
tdb_map_size;
tdb_name;
tdb_nextkey;
tdb_open;
tdb_open_ex;
tdb_parse_record;
tdb_printfreelist;
tdb_remove_flags;
tdb_reopen;
tdb_reopen_all;
tdb_repack;
tdb_setalarm_sigptr;
tdb_set_logging_function;
tdb_set_max_dead;
tdb_store;
tdb_transaction_cancel;
tdb_transaction_commit;
tdb_transaction_prepare_commit;
tdb_transaction_start;
tdb_transaction_start_nonblock;
tdb_traverse;
tdb_traverse_read;
tdb_unlockall;
tdb_unlockall_read;
tdb_validate_freelist;
tdb_wipe_all;
tdb_null;
local: *;
};

View File

@ -1,109 +0,0 @@
dirs::
@mkdir -p bin common tools
PROGS = bin/tdbtool$(EXEEXT) bin/tdbrestore$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbtorture$(EXEEXT)
ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
TDB_SONAME = libtdb.$(SHLIBEXT).1
TDB_SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
TDB_STLIB = libtdb.a
TDB_LIB = $(TDB_STLIB)
bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm $(TDB_DEPS)
bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb $(TDB_DEPS)
bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb $(TDB_DEPS)
bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb $(TDB_DEPS)
bin/tdbrestore$(EXEEXT): tools/tdbrestore.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbrestore tools/tdbrestore.o -L. -ltdb $(TDB_DEPS)
bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb $(TDB_DEPS)
test:: abi_checks
test:: bin/tdbtorture$(EXEEXT) $(TDB_SONAME)
$(LIB_PATH_VAR)=. bin/tdbtorture$(EXEEXT)
abi_checks::
@echo ABI checks:
@./script/abi_checks.sh tdb include/tdb.h
clean::
rm -f test.db test.tdb torture.tdb test.gdbm
rm -f $(TDB_SONAME) $(TDB_SOLIB) $(TDB_STLIB) libtdb.$(SHLIBEXT)
rm -f $(ALL_PROGS) tdb.pc
rm -f tdb.exports.sort tdb.exports.check tdb.exports.check.sort
rm -f tdb.signatures.sort tdb.signatures.check tdb.signatures.check.sort
build-python:: tdb.$(SHLIBEXT)
pytdb.o: $(tdbdir)/pytdb.c
$(CC) $(PICFLAG) -c $(tdbdir)/pytdb.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags`
tdb.$(SHLIBEXT): libtdb.$(SHLIBEXT) pytdb.o
$(SHLD) $(SHLD_FLAGS) -o $@ pytdb.o -L. -ltdb `$(PYTHON_CONFIG) --ldflags` $(TDB_DEPS)
install:: installdirs installbin installheaders installlibs \
$(PYTHON_INSTALL_TARGET) installdocs
doc:: manpages/tdbbackup.8 manpages/tdbrestore.8 manpages/tdbdump.8 manpages/tdbtool.8
.SUFFIXES: .8.xml .8
.8.xml.8:
-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
installdocs::
${INSTALLCMD} -d $(DESTDIR)$(mandir)/man8
for I in manpages/*.8; do \
${INSTALLCMD} -m 644 $$I $(DESTDIR)$(mandir)/man8; \
done
install-python:: build-python
mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
cp tdb.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
check-python:: build-python $(TDB_SONAME)
$(LIB_PATH_VAR)=. PYTHONPATH=".:$(tdbdir)" $(PYTHON) $(tdbdir)/python/tests/simple.py
clean::
rm -f tdb.$(SHLIBEXT)
installdirs::
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(includedir)
mkdir -p $(DESTDIR)$(libdir)
mkdir -p $(DESTDIR)$(libdir)/pkgconfig
installbin:: all installdirs
cp $(PROGS) $(DESTDIR)$(bindir)
installheaders:: installdirs
cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
installlibs:: all installdirs
cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig
cp $(TDB_STLIB) $(TDB_SOLIB) $(DESTDIR)$(libdir)
rm -f $(DESTDIR)$(libdir)/libtdb.$(SHLIBEXT)
ln -s $(TDB_SOLIB) $(DESTDIR)$(libdir)/libtdb.$(SHLIBEXT)
rm -f $(DESTDIR)$(libdir)/$(TDB_SONAME)
ln -s $(TDB_SOLIB) $(DESTDIR)$(libdir)/$(TDB_SONAME)
$(TDB_STLIB): $(TDB_OBJ)
ar -rv $(TDB_STLIB) $(TDB_OBJ)
libtdb.$(SHLIBEXT): $(TDB_SOLIB)
ln -fs $< $@
$(TDB_SONAME): $(TDB_SOLIB)
ln -fs $< $@

View File

@ -36,14 +36,12 @@ tasks = {
("test", "TDB_NO_FSYNC=1 make test", "text/plain") ],
# We don't use TDB_NO_FSYNC=1 here, because we want to test the transaction code
"lib/tdb" : [ ("autogen", "./autogen-waf.sh", "text/plain"),
("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
"lib/tdb" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make -j", "text/plain"),
("install", "make install", "text/plain"),
("test", "make test", "text/plain") ],
"lib/talloc" : [ ("autogen", "./autogen-waf.sh", "text/plain"),
("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
"lib/talloc" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make -j", "text/plain"),
("install", "make install", "text/plain"),
("test", "make test", "text/plain"), ],