8 # find the buildtools directory
10 buildtools = 'buildtools ../../buildtools'
11 for d in buildtools.split():
13 srcdir = os.path.dirname(d) or '.'
17 LIBREPLACE_DIR= srcdir + '/lib/replace'
20 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
21 import wafsamba, samba_dist
23 # setup what directories to put in a tarball
24 samba_dist.DIST_DIRS('lib/talloc:. lib/replace:lib/replace buildtools:buildtools')
28 opt.BUILTIN_DEFAULT('replace')
29 opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextenion='talloc')
30 opt.recurse(LIBREPLACE_DIR)
33 conf.sub_config(LIBREPLACE_DIR)
35 if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION,
36 implied_deps='replace'):
37 conf.define('USING_SYSTEM_TALLOC', 1)
39 conf.env.standalone_talloc = conf.IN_LAUNCH_DIR()
46 bld.BUILD_SUBDIR(LIBREPLACE_DIR)
48 if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
49 bld.SAMBA_LIBRARY('talloc',
54 if not getattr(bld.env, '_SAMBA_BUILD_', 0) == 4:
55 # s4 already has the talloc testsuite builtin to smbtorture
56 bld.SAMBA_BINARY('talloc_testsuite',
57 'testsuite_main.c testsuite.c',
61 if bld.env.standalone_talloc:
62 bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
63 bld.env.TALLOC_VERSION = VERSION
64 bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION)
68 '''makes a tarball for distribution'''