summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-25 02:58:12 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:46:06 +0100
commite4168bb0e0a9b4837ce18b19a2d43a8ae846d2d6 (patch)
tree4c043adc3604d9119d3933888772c1f566849080 /source4/lib
parente30c3d96842bc0f1be107a4a46676150733ea39c (diff)
downloadsamba-e4168bb0e0a9b4837ce18b19a2d43a8ae846d2d6.tar.gz
samba-e4168bb0e0a9b4837ce18b19a2d43a8ae846d2d6.tar.bz2
samba-e4168bb0e0a9b4837ce18b19a2d43a8ae846d2d6.zip
r26106: Add targets for building, installing and checking python bindings.
(This used to be commit 7f1d38df053545fd0763baf172e78807d776e6ef)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/Makefile.in24
-rwxr-xr-xsource4/lib/ldb/setup.py2
2 files changed, 20 insertions, 6 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index a4723f99a5..715961624d 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -99,6 +99,12 @@ SONAME = libldb.$(SHLIBEXT).0
SOLIB = lib/libldb.$(SHLIBEXT).0.9.0
STATICLIB = lib/libldb.a
+lib/$(SONAME): $(SOLIB)
+ ln -fs $< $@
+
+lib/libldb.$(SHLIBEXT): $(SOLIB)
+ ln -fs $< $@
+
$(SOLIB): $(OBJS)
$(SHLD) $(SHLD_FLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) $(TALLOC_LIBS) $(TDB_LIBS) $(LDAP_LIBS) @SONAMEFLAG@$(SONAME)
@@ -170,22 +176,23 @@ manpages:
doxygen:
test -z "$(DOXYGEN)" || (cd $(srcdir) && "$(DOXYGEN)")
-clean:
+clean::
rm -f *.o */*.o *.gcov */*.gc?? tdbtest.ldb*
rm -f $(BINS) $(TDB_OBJ) $(TALLOC_OBJ) $(STATICLIB) $(NSS_LIB) $(SOLIB)
+ rm -f $(POPT_OBJ)
rm -f man/*.1 man/*.3 man/*.html
rm -f $(EXAMPLES)
rm -rf apidocs/
rm -rf tests/schema/
-distclean: clean
+distclean:: clean
rm -f *~ */*~
rm -rf bin lib
rm -f config.log config.status config.cache include/config.h
rm -f ldb.pc
rm -f Makefile
-realdistclean: distclean
+realdistclean:: distclean
rm -f configure.in include/config.h.in
check:: test check-soloading
@@ -201,7 +208,7 @@ valgrindtest: all
installcheck: install test
-install: all
+install:: all
mkdir -p $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig $(DESTDIR)$(libdir) $(bindir)
cp $(srcdir)/include/ldb.h $(srcdir)/include/ldb_errors.h $(DESTDIR)$(includedir)
cp $(STATICLIB) $(SOLIB) $(DESTDIR)$(libdir)
@@ -224,8 +231,15 @@ ctags:
ctags `find $(srcdir) -name "*.[ch]"`
# Python bindings
-build-python:
+build-python: lib/libldb.$(SHLIBEXT)
./setup.py build
install-python:
./setup.py install --prefix=$(prefix)
+
+check-python: build-python
+ # FIXME: This isn't portable
+ LD_LIBRARY_PATH=lib PYTHONPATH=.:build/lib.linux-i686-2.4/ trial tests/python/api.py
+
+clean-python:
+ ./setup.py clean
diff --git a/source4/lib/ldb/setup.py b/source4/lib/ldb/setup.py
index bff604d5aa..47326e2fae 100755
--- a/source4/lib/ldb/setup.py
+++ b/source4/lib/ldb/setup.py
@@ -10,5 +10,5 @@ setup(name="ldb",
license="LGPLv3",
keywords=["ldap","ldb","db","ldif"],
ext_modules=[Extension('_ldb', ['ldb.i'], include_dirs=['include'],
- libraries=['ldb','ldap'])],
+ library_dirs=["lib"], libraries=['ldb','ldap'])],
)