From aec015525b09fce9ce7be274d1a4591f81fac0ef Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 9 Feb 2011 15:55:18 +1100 Subject: 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/ --- buildtools/wafsamba/wafsamba.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'buildtools') 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 -- cgit