summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-09-26 10:44:27 +0200
committerGünther Deschner <gd@samba.org>2010-09-27 00:39:37 +0200
commitca2bbe00dc799a7783fb101c4860911727739ebd (patch)
tree03fd03e3a06d11e06dcf3e1e1a1081d73e1e7c61 /buildtools/wafsamba
parent0326012db72ef06066dac0cb2608e26f98d722cc (diff)
downloadsamba-ca2bbe00dc799a7783fb101c4860911727739ebd.tar.gz
samba-ca2bbe00dc799a7783fb101c4860911727739ebd.tar.bz2
samba-ca2bbe00dc799a7783fb101c4860911727739ebd.zip
s3-waf: add some module specific functions for s3 waf build.
Thanks to Kai. Guenther
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba3.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index 5fa4c0fa74..9abb2abbec 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -2,6 +2,7 @@
# and for SAMBA_ macros for building libraries, binaries etc
import Options
+import Build
from optparse import SUPPRESS_HELP
def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
@@ -21,3 +22,22 @@ def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
opt.add_option(without_val, help=SUPPRESS_HELP, action="store_false",
dest=dest)
Options.Handler.SAMBA3_ADD_OPTION = SAMBA3_ADD_OPTION
+
+def SAMBA3_IS_STATIC_MODULE(bld, module):
+ '''Check whether module is in static list'''
+ if module.lower() in bld.env['static_modules']:
+ return True
+ return False
+Build.BuildContext.SAMBA3_IS_STATIC_MODULE = SAMBA3_IS_STATIC_MODULE
+
+def SAMBA3_IS_SHARED_MODULE(bld, module):
+ '''Check whether module is in shared list'''
+ if module.lower() in bld.env['shared_modules']:
+ return True
+ return False
+Build.BuildContext.SAMBA3_IS_SHARED_MODULE = SAMBA3_IS_SHARED_MODULE
+
+def SAMBA3_IS_ENABLED_MODULE(bld, module):
+ '''Check whether module is in either shared or static list '''
+ return SAMBA3_IS_STATIC_MODULE(bld, module) or SAMBA3_IS_SHARED_MODULE(bld, module)
+Build.BuildContext.SAMBA3_IS_ENABLED_MODULE = SAMBA3_IS_ENABLED_MODULE