mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s4-waf: use a common pattern for finding buildtools and libs
This commit is contained in:
parent
553324bc10
commit
c8835f440a
@ -8,15 +8,10 @@ blddir = 'bin'
|
||||
import os, sys
|
||||
|
||||
# find the buildtools directory
|
||||
buildtools = 'buildtools'
|
||||
while not os.path.exists(buildtools) and len(buildtools.split('/')) < 5:
|
||||
buildtools = '../' + buildtools
|
||||
srcdir = os.path.dirname(buildtools) or '.'
|
||||
|
||||
sys.path.insert(0, buildtools + "/wafsamba")
|
||||
|
||||
|
||||
LIBREPLACE_DIR= '../replace'
|
||||
srcdir = '.'
|
||||
while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
|
||||
srcdir = '../' + srcdir
|
||||
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
|
||||
|
||||
import sys
|
||||
sys.path.insert(0, srcdir+"/buildtools/wafsamba")
|
||||
@ -29,10 +24,10 @@ samba_dist.DIST_DIRS('lib/talloc:. lib/replace:lib/replace buildtools:buildtools
|
||||
def set_options(opt):
|
||||
opt.BUILTIN_DEFAULT('replace')
|
||||
opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextenion='talloc')
|
||||
opt.RECURSE(LIBREPLACE_DIR)
|
||||
opt.RECURSE('lib/replace')
|
||||
|
||||
def configure(conf):
|
||||
conf.RECURSE(LIBREPLACE_DIR)
|
||||
conf.RECURSE('lib/replace')
|
||||
|
||||
if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION,
|
||||
implied_deps='replace'):
|
||||
@ -45,7 +40,7 @@ def configure(conf):
|
||||
|
||||
|
||||
def build(bld):
|
||||
bld.RECURSE(LIBREPLACE_DIR)
|
||||
bld.RECURSE('lib/replace')
|
||||
|
||||
if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
|
||||
bld.SAMBA_LIBRARY('talloc',
|
||||
|
@ -8,26 +8,22 @@ blddir = 'bin'
|
||||
import sys, os
|
||||
|
||||
# find the buildtools directory
|
||||
buildtools = 'buildtools'
|
||||
while not os.path.exists(buildtools) and len(buildtools.split('/')) < 5:
|
||||
buildtools = '../' + buildtools
|
||||
srcdir = os.path.dirname(buildtools) or '.'
|
||||
srcdir = '.'
|
||||
while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
|
||||
srcdir = '../' + srcdir
|
||||
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
|
||||
|
||||
sys.path.insert(0, buildtools + "/wafsamba")
|
||||
import wafsamba, samba_dist
|
||||
|
||||
samba_dist.DIST_DIRS('lib/tdb:. lib/replace:lib/replace buildtools:buildtools')
|
||||
|
||||
|
||||
LIBREPLACE_DIR= '../replace'
|
||||
|
||||
def set_options(opt):
|
||||
opt.BUILTIN_DEFAULT('replace')
|
||||
opt.BUNDLED_EXTENSION_DEFAULT('tdb', noextenion='tdb')
|
||||
opt.RECURSE(LIBREPLACE_DIR)
|
||||
opt.RECURSE('lib/replace')
|
||||
|
||||
def configure(conf):
|
||||
conf.RECURSE(LIBREPLACE_DIR)
|
||||
conf.RECURSE('lib/replace')
|
||||
|
||||
if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION,
|
||||
implied_deps='replace'):
|
||||
@ -36,7 +32,7 @@ def configure(conf):
|
||||
conf.SAMBA_CONFIG_H()
|
||||
|
||||
def build(bld):
|
||||
bld.RECURSE(LIBREPLACE_DIR)
|
||||
bld.RECURSE('lib/replace')
|
||||
|
||||
COMMON_SRC = bld.SUBDIR('common',
|
||||
'''check.c error.c tdb.c traverse.c
|
||||
|
@ -8,29 +8,24 @@ blddir = 'bin'
|
||||
import sys, os
|
||||
|
||||
# find the buildtools directory
|
||||
buildtools = 'buildtools'
|
||||
while not os.path.exists(buildtools) and len(buildtools.split('/')) < 5:
|
||||
buildtools = '../' + buildtools
|
||||
srcdir = os.path.dirname(buildtools) or '.'
|
||||
|
||||
sys.path.insert(0, buildtools + "/wafsamba")
|
||||
srcdir = '.'
|
||||
while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
|
||||
srcdir = '../' + srcdir
|
||||
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
|
||||
|
||||
import wafsamba, samba_dist
|
||||
|
||||
samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc buildtools:buildtools')
|
||||
|
||||
LIBREPLACE_DIR= '../replace'
|
||||
LIBTALLOC_DIR= '../talloc'
|
||||
|
||||
def set_options(opt):
|
||||
opt.BUILTIN_DEFAULT('replace')
|
||||
opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextenion='tevent')
|
||||
opt.RECURSE(LIBREPLACE_DIR)
|
||||
opt.RECURSE(LIBTALLOC_DIR)
|
||||
opt.RECURSE('lib/replace')
|
||||
opt.RECURSE('lib/talloc')
|
||||
|
||||
def configure(conf):
|
||||
conf.RECURSE(LIBREPLACE_DIR)
|
||||
conf.RECURSE(LIBTALLOC_DIR)
|
||||
conf.RECURSE('lib/replace')
|
||||
conf.RECURSE('lib/talloc')
|
||||
|
||||
if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION,
|
||||
onlyif='talloc', implied_deps='replace talloc'):
|
||||
@ -42,8 +37,8 @@ def configure(conf):
|
||||
conf.SAMBA_CONFIG_H()
|
||||
|
||||
def build(bld):
|
||||
bld.RECURSE(LIBREPLACE_DIR)
|
||||
bld.RECURSE(LIBTALLOC_DIR)
|
||||
bld.RECURSE('lib/replace')
|
||||
bld.RECURSE('lib/talloc')
|
||||
|
||||
SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
|
||||
tevent_queue.c tevent_req.c tevent_select.c
|
||||
|
@ -6,33 +6,30 @@ VERSION = '0.9.10'
|
||||
blddir = 'bin'
|
||||
|
||||
import sys, os
|
||||
# find the buildtools directory
|
||||
buildtools = 'buildtools'
|
||||
while not os.path.exists(buildtools) and len(buildtools.split('/')) < 5:
|
||||
buildtools = '../' + buildtools
|
||||
srcdir = os.path.dirname(buildtools) or '.'
|
||||
|
||||
sys.path.insert(0, buildtools + "/wafsamba")
|
||||
# find the buildtools directory
|
||||
srcdir = '.'
|
||||
while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
|
||||
srcdir = '../' + srcdir
|
||||
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
|
||||
|
||||
import wafsamba, samba_dist
|
||||
|
||||
samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
|
||||
lib/tdb:lib/tdb lib/tevent:lib/tevent buildtools:buildtools''')
|
||||
|
||||
|
||||
LIBTDB_DIR= '../../../lib/tdb'
|
||||
LIBTEVENT_DIR= '../../../lib/tevent'
|
||||
LIBPOPT_DIR= '../../../lib/popt'
|
||||
|
||||
def set_options(opt):
|
||||
opt.BUILTIN_DEFAULT('replace')
|
||||
opt.BUNDLED_EXTENSION_DEFAULT('ldb', noextenion='ldb')
|
||||
opt.RECURSE(LIBTDB_DIR)
|
||||
opt.RECURSE(LIBTEVENT_DIR)
|
||||
opt.RECURSE('lib/tdb')
|
||||
opt.RECURSE('lib/tevent')
|
||||
|
||||
def configure(conf):
|
||||
conf.RECURSE(LIBTDB_DIR)
|
||||
conf.RECURSE(LIBTEVENT_DIR)
|
||||
conf.RECURSE(LIBPOPT_DIR)
|
||||
conf.RECURSE('lib/tdb')
|
||||
conf.RECURSE('lib/tevent')
|
||||
conf.RECURSE('lib/popt')
|
||||
|
||||
# where does the default LIBDIR end up? in conf.env somewhere?
|
||||
#
|
||||
conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb')
|
||||
@ -53,9 +50,9 @@ def configure(conf):
|
||||
conf.SAMBA_CONFIG_H()
|
||||
|
||||
def build(bld):
|
||||
bld.RECURSE(LIBTDB_DIR)
|
||||
bld.RECURSE(LIBTEVENT_DIR)
|
||||
bld.RECURSE(LIBPOPT_DIR)
|
||||
bld.RECURSE('lib/tdb')
|
||||
bld.RECURSE('lib/tevent')
|
||||
bld.RECURSE('lib/popt')
|
||||
|
||||
# in Samba4 we build some extra modules, and add extra
|
||||
# capabilities to the ldb cmdline tools
|
||||
|
Loading…
x
Reference in New Issue
Block a user