1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

Remove swig support from standalone ldb build.

This commit is contained in:
Jelmer Vernooij 2008-12-19 01:24:00 +00:00
parent a57b1aa0f1
commit e0672ae29b
6 changed files with 7 additions and 21 deletions

View File

@ -17,7 +17,6 @@ builddir = @builddir@
sharedbuilddir = @sharedbuilddir@
INSTALLCMD = @INSTALL@
SLAPD = @SLAPD@
SWIG = swig
EXTRA_OBJ=@EXTRA_OBJ@
TESTS=test-tdb.sh @TESTS@
PACKAGE_VERSION = @PACKAGE_VERSION@

View File

@ -11,8 +11,6 @@ autoconf $IPATHS || exit 1
rm -rf autom4te.cache
swig -O -Wall -python -keyword ldb.i # Ignore errors, for now
echo "Now run ./configure and then make."
exit 0

View File

@ -62,25 +62,20 @@ examples/ldifreader: examples/ldifreader.o
$(CC) -o examples/ldifreader examples/ldifreader.o $(LIB_FLAGS)
# Python bindings
build-python:: _ldb.$(SHLIBEXT)
build-python:: ldb.$(SHLIBEXT)
ldb_wrap.o: $(ldbdir)/ldb_wrap.c
$(CC) $(PICFLAG) -c $(ldbdir)/ldb_wrap.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags`
_ldb.$(SHLIBEXT): ldb_wrap.o
$(SHLD) $(SHLD_FLAGS) -o _ldb.$(SHLIBEXT) ldb_wrap.o $(LIB_FLAGS) `$(PYTHON_CONFIG) --ldflags`
ldb.$(SHLIBEXT): ldb_wrap.o
$(SHLD) $(SHLD_FLAGS) -o ldb.$(SHLIBEXT) ldb_wrap.o $(LIB_FLAGS) `$(PYTHON_CONFIG) --ldflags`
install-python:: build-python
mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"` \
$(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
cp $(ldbdir)/ldb.py $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"`
cp _ldb.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
install-swig::
cp ldb.i `$(SWIG) -swiglib`
mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
cp ldb.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
check-python:: build-python
LD_LIBRARY_PATH=lib PYTHONPATH=.:$(ldbdir) $(PYTHON) $(ldbdir)/tests/python/api.py
clean::
rm -f _ldb.$(SHLIBEXT)
rm -f ldb.$(SHLIBEXT)

View File

@ -5,4 +5,4 @@ PUBLIC_DEPENDENCIES = LIBLDB LIBEVENTS PYTALLOC
swig_ldb_OBJ_FILES = $(ldbsrcdir)/pyldb.o
$(swig_ldb_OBJ_FILES): CFLAGS+=-I$(ldbsrcdir)/include
$(swig_ldb_OBJ_FILES): CFLAGS+=$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)
$(swig_ldb_OBJ_FILES): CFLAGS+=$(CFLAG_NO_CAST_QUAL)

View File

@ -4,11 +4,6 @@ etags:
ctags:
ctags `find $(srcdir) -name "*.[ch]"`
.SUFFIXES: _wrap.c .i
.i_wrap.c:
[ "$(SWIG)" = "no" ] || $(SWIG) -O -Wall -python -keyword $<
.SUFFIXES: .1 .1.xml .3 .3.xml .xml .html .c .o
.c.o:

View File

@ -6,7 +6,6 @@ import os, sys
import unittest
# Required for the standalone LDB build
sys.path.append("swig")
sys.path.append("build/lib.linux-i686-2.4")
import ldb