summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/wafsamba.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-07 15:17:46 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:42 +1000
commit39807fd091e8feffb5d6ec089409d36e35ef7f28 (patch)
tree75d0078a27e89b313c7e16e86ae25f1b2a7a7e65 /buildtools/wafsamba/wafsamba.py
parentdd05b6512ab2d5c8fc2d0fe18fcd19b62fee6f01 (diff)
downloadsamba-39807fd091e8feffb5d6ec089409d36e35ef7f28.tar.gz
samba-39807fd091e8feffb5d6ec089409d36e35ef7f28.tar.bz2
samba-39807fd091e8feffb5d6ec089409d36e35ef7f28.zip
build: smarter list splitting
Diffstat (limited to 'buildtools/wafsamba/wafsamba.py')
-rw-r--r--buildtools/wafsamba/wafsamba.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 7686a891b2..30324f7d7a 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -27,12 +27,6 @@ def SAMBA_BUILD_ENV(conf):
if not os.path.exists(libpath):
os.mkdir(libpath)
-##############################################
-# remove .. elements from a path list
-def NORMPATH(bld, ilist):
- return " ".join([os.path.normpath(p) for p in ilist.split(" ")])
-Build.BuildContext.NORMPATH = NORMPATH
-
################################################################
# add an init_function to the list for a subsystem
def ADD_INIT_FUNCTION(bld, subsystem, init_function):
@@ -102,7 +96,7 @@ def ADD_DEPENDENCIES(bld, name, deps):
lib_deps = LOCAL_CACHE(bld, 'LIB_DEPS')
if not name in lib_deps:
lib_deps[name] = {}
- list = deps.split()
+ list = to_list(deps)
list2 = []
for d in list:
lib_deps[name][d] = True;
@@ -161,9 +155,9 @@ def ADD_DEPENDENCIES(bld, name, deps):
if recurse and (d in lib_deps):
rec_deps = ' '.join(lib_deps[d].keys())
(rec_sysdeps, rec_localdeps, rec_add_objects) = ADD_DEPENDENCIES(bld, d, rec_deps)
- sysdeps.extend(rec_sysdeps.split())
- localdeps.extend(rec_localdeps.split())
- add_objects.extend(rec_add_objects.split())
+ sysdeps.extend(to_list(rec_sysdeps))
+ localdeps.extend(to_list(rec_localdeps))
+ add_objects.extend(to_list(rec_add_objects))
debug('deps: Dependencies for %s: sysdeps: %u localdeps: %u add_objects=%u' % (
name, len(sysdeps), len(localdeps), len(add_objects)))
@@ -175,7 +169,7 @@ def ADD_DEPENDENCIES(bld, name, deps):
def SAMBA_LIBRARY_INCLUDE_LIST(bld, deps):
ret = bld.curdir + ' '
cache = LOCAL_CACHE(bld, 'INCLUDE_LIST')
- for l in deps.split():
+ for l in to_list(deps):
if l in cache:
ret = ret + cache[l] + ' '
if 'EXTRA_INCLUDES' in bld.env:
@@ -272,7 +266,7 @@ def SAMBA_BINARY(bld, binname, source,
cache = LOCAL_CACHE(bld, 'INIT_FUNCTIONS')
if modules is not None:
- for m in modules.split():
+ for m in to_list(modules):
bld.ASSERT(m in cache,
"No init_function defined for module '%s' in binary '%s'" % (m, binname))
cflags += ' -DSTATIC_%s_MODULES="%s"' % (m, cache[m])