summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_utils.py11
-rw-r--r--buildtools/wafsamba/wafsamba.py7
2 files changed, 17 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 477e0b41db..70d06704e7 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -642,8 +642,17 @@ def PROCESS_SEPARATE_RULE(self, rule):
if txt:
dc = {'ctx': self}
if getattr(self.__class__, 'pre_recurse', None):
- dc = self.pre_recurse(txt, file_path, [])
+ dc = self.pre_recurse(txt, file_path, self.curdir)
exec(compile(txt, file_path, 'exec'), dc)
+ if getattr(self.__class__, 'post_recurse', None):
+ dc = self.post_recurse(txt, file_path, self.curdir)
Build.BuildContext.PROCESS_SEPARATE_RULE = PROCESS_SEPARATE_RULE
ConfigurationContext.PROCESS_SEPARATE_RULE = PROCESS_SEPARATE_RULE
+
+def AD_DC_BUILD_IS_ENABLED(self):
+ if self.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
+ return True
+ return False
+
+Build.BuildContext.AD_DC_BUILD_IS_ENABLED = AD_DC_BUILD_IS_ENABLED
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 534bace25b..f1e7affbef 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -413,6 +413,9 @@ def SAMBA_MODULE(bld, modname, source,
source = bld.SUBDIR(subdir, source)
if internal_module or BUILTIN_LIBRARY(bld, modname):
+ # Do not create modules for disabled subsystems
+ if subsystem and GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
+ return
bld.SAMBA_SUBSYSTEM(modname, source,
deps=deps,
includes=includes,
@@ -430,6 +433,10 @@ def SAMBA_MODULE(bld, modname, source,
SET_TARGET_TYPE(bld, modname, 'DISABLED')
return
+ # Do not create modules for disabled subsystems
+ if subsystem and GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
+ return
+
obj_target = modname + '.objlist'
realname = modname