10 # find the buildtools directory
12 while not os
.path
.exists(srcdir
+'/buildtools') and len(srcdir
.split('/')) < 5:
13 srcdir
= '../' + srcdir
14 sys
.path
.insert(0, srcdir
+ '/buildtools/wafsamba')
16 import wafsamba
, samba_dist
18 samba_dist
.DIST_DIRS('lib/tdb:. lib/replace:lib/replace buildtools:buildtools')
21 opt
.BUILTIN_DEFAULT('replace')
22 opt
.BUNDLED_EXTENSION_DEFAULT('tdb', noextenion
='tdb')
23 opt
.RECURSE('lib/replace')
26 conf
.RECURSE('lib/replace')
28 if conf
.CHECK_BUNDLED_SYSTEM('tdb', minversion
=VERSION
,
29 implied_deps
='replace'):
30 conf
.define('USING_SYSTEM_TDB', 1)
35 bld
.RECURSE('lib/replace')
37 COMMON_SRC
= bld
.SUBDIR('common',
38 '''check.c error.c tdb.c traverse.c
39 freelistcheck.c lock.c dump.c freelist.c
40 io.c open.c transaction.c''')
42 if not bld
.CONFIG_SET('USING_SYSTEM_TDB'):
43 bld
.SAMBA_LIBRARY('tdb',
49 bld
.SAMBA_BINARY('tdbtorture',
53 bld
.SAMBA_BINARY('tdbdump',
57 bld
.SAMBA_BINARY('tdbbackup',
61 bld
.SAMBA_BINARY('tdbtool',
65 s4_build
= getattr(bld
.env
, '_SAMBA_BUILD_', 0) == 4
67 bld
.SAMBA_PYTHON('pytdb',
75 '''run tdb testsuite'''
77 cmd
= os
.path
.join(Utils
.g_module
.blddir
, 'tdbtorture')
81 '''makes a tarball for distribution'''