summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-02-09 15:55:18 +1100
committerAndrew Tridgell <tridge@samba.org>2011-02-18 15:09:45 +1100
commitaec015525b09fce9ce7be274d1a4591f81fac0ef (patch)
treeb859a743ca42eb76fdfa67f91379b4a3dd997dcf /buildtools
parenta7ee6e81fffc92d85dca26ae236e339e7d7eb83e (diff)
downloadsamba-aec015525b09fce9ce7be274d1a4591f81fac0ef.tar.gz
samba-aec015525b09fce9ce7be274d1a4591f81fac0ef.tar.bz2
samba-aec015525b09fce9ce7be274d1a4591f81fac0ef.zip
waf: added subdir= option in SAMBA_*() rules
this allows you to prepend a subdirectory to the source rules, after variable substitution. This is useful for the s3 waf build when it is in s3build/
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index be8cad31ad..c04be69e50 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -110,6 +110,7 @@ def SAMBA_LIBRARY(bld, libname, source,
depends_on='',
local_include=True,
vars=None,
+ subdir=None,
install_path=None,
install=True,
pyembed=False,
@@ -131,6 +132,8 @@ def SAMBA_LIBRARY(bld, libname, source,
return
source = bld.EXPAND_VARIABLES(source, vars=vars)
+ if subdir:
+ source = bld.SUBDIR(subdir, source)
# remember empty libraries, so we can strip the dependencies
if ((source == '') or (source == [])) and deps == '' and public_deps == '':
@@ -280,6 +283,7 @@ def SAMBA_BINARY(bld, binname, source,
subsystem_name=None,
pyembed=False,
vars=None,
+ subdir=None,
install=True,
install_path=None,
enabled=True):
@@ -299,6 +303,8 @@ def SAMBA_BINARY(bld, binname, source,
obj_target = binname + '.objlist'
source = bld.EXPAND_VARIABLES(source, vars=vars)
+ if subdir:
+ source = bld.SUBDIR(subdir, source)
source = unique_list(TO_LIST(source))
if group == 'binaries':
@@ -444,6 +450,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
use_hostcc=False,
use_global_deps=True,
vars=None,
+ subdir=None,
hide_symbols=False,
pyext=False):
'''define a Samba subsystem'''
@@ -461,6 +468,8 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
return
source = bld.EXPAND_VARIABLES(source, vars=vars)
+ if subdir:
+ source = bld.SUBDIR(subdir, source)
source = unique_list(TO_LIST(source))
deps += ' ' + public_deps