[PATCH] build: replace SAMBA3_ADD_OPTION with samba_add_onoff_option

David Disseldorp ddiss at samba.org
Wed Jan 30 16:13:47 UTC 2019


The former is just an alias for the latter. samba_add_onoff_option()
better describes what the function actually does, so use that and
remove the alias.

Signed-off-by: David Disseldorp <ddiss at samba.org>
---

Gitlab MR: https://gitlab.com/samba-team/samba/merge_requests/232

 buildtools/wafsamba/samba3.py          |  4 +--
 source3/wscript                        | 56 +++++++++++++++++-----------------
 source4/dsdb/samdb/ldb_modules/wscript |  2 +-
 3 files changed, 30 insertions(+), 32 deletions(-)

diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index 5375679c88f..5aab2509b24 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -2,12 +2,10 @@
 # and for SAMBA_ macros for building libraries, binaries etc
 
 import os
-from waflib import Options, Build
+from waflib import Build
 from samba_utils import os_path_relpath, TO_LIST
 from samba_autoconf import library_flags
 
-Options.OptionsContext.SAMBA3_ADD_OPTION = Options.OptionsContext.samba_add_onoff_option
-
 def SAMBA3_IS_STATIC_MODULE(bld, module):
     '''Check whether module is in static list'''
     if module in bld.env['static_modules']:
diff --git a/source3/wscript b/source3/wscript
index d2916593888..8086359f706 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -40,45 +40,45 @@ def options(opt):
                          "--with-shared-modules"),
                    action="store", dest='shared_modules', default=None)
 
-    opt.SAMBA3_ADD_OPTION('winbind')
-    opt.SAMBA3_ADD_OPTION('ads')
-    opt.SAMBA3_ADD_OPTION('ldap')
-    opt.SAMBA3_ADD_OPTION('cups', with_name="enable", without_name="disable")
-    opt.SAMBA3_ADD_OPTION('iprint', with_name="enable", without_name="disable")
-    opt.SAMBA3_ADD_OPTION('pam')
-    opt.SAMBA3_ADD_OPTION('quotas')
-    opt.SAMBA3_ADD_OPTION('sendfile-support', default=None)
-    opt.SAMBA3_ADD_OPTION('utmp')
-    opt.SAMBA3_ADD_OPTION('avahi', with_name="enable", without_name="disable")
-    opt.SAMBA3_ADD_OPTION('iconv')
-    opt.SAMBA3_ADD_OPTION('acl-support')
-    opt.SAMBA3_ADD_OPTION('dnsupdate')
-    opt.SAMBA3_ADD_OPTION('syslog')
-    opt.SAMBA3_ADD_OPTION('automount')
-    opt.SAMBA3_ADD_OPTION('dmapi', default=None) # None means autodetection
-    opt.SAMBA3_ADD_OPTION('fam', default=None) # None means autodetection
-    opt.SAMBA3_ADD_OPTION('profiling-data', default=False)
-    opt.SAMBA3_ADD_OPTION('libarchive', default=True)
-
-    opt.SAMBA3_ADD_OPTION('cluster-support', default=False)
-
-    opt.SAMBA3_ADD_OPTION('regedit', default=None)
-
-    opt.SAMBA3_ADD_OPTION('fake-kaserver',
+    opt.samba_add_onoff_option('winbind')
+    opt.samba_add_onoff_option('ads')
+    opt.samba_add_onoff_option('ldap')
+    opt.samba_add_onoff_option('cups', with_name="enable", without_name="disable")
+    opt.samba_add_onoff_option('iprint', with_name="enable", without_name="disable")
+    opt.samba_add_onoff_option('pam')
+    opt.samba_add_onoff_option('quotas')
+    opt.samba_add_onoff_option('sendfile-support', default=None)
+    opt.samba_add_onoff_option('utmp')
+    opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable")
+    opt.samba_add_onoff_option('iconv')
+    opt.samba_add_onoff_option('acl-support')
+    opt.samba_add_onoff_option('dnsupdate')
+    opt.samba_add_onoff_option('syslog')
+    opt.samba_add_onoff_option('automount')
+    opt.samba_add_onoff_option('dmapi', default=None) # None means autodetection
+    opt.samba_add_onoff_option('fam', default=None) # None means autodetection
+    opt.samba_add_onoff_option('profiling-data', default=False)
+    opt.samba_add_onoff_option('libarchive', default=True)
+
+    opt.samba_add_onoff_option('cluster-support', default=False)
+
+    opt.samba_add_onoff_option('regedit', default=None)
+
+    opt.samba_add_onoff_option('fake-kaserver',
                           help=("Include AFS fake-kaserver support"), default=False)
 
     opt.add_option('--with-libcephfs',
                    help=("Directory under which libcephfs is installed"),
                    action="store", dest='libcephfs_dir', default=None)
 
-    opt.SAMBA3_ADD_OPTION('glusterfs', with_name="enable", without_name="disable", default=True)
-    opt.SAMBA3_ADD_OPTION('cephfs', with_name="enable", without_name="disable", default=True)
+    opt.samba_add_onoff_option('glusterfs', with_name="enable", without_name="disable", default=True)
+    opt.samba_add_onoff_option('cephfs', with_name="enable", without_name="disable", default=True)
 
     opt.add_option('--enable-vxfs',
                   help=("enable support for VxFS (default=no)"),
                   action="store_true", dest='enable_vxfs', default=False)
 
-    opt.SAMBA3_ADD_OPTION('spotlight', with_name="enable", without_name="disable", default=False)
+    opt.samba_add_onoff_option('spotlight', with_name="enable", without_name="disable", default=False)
 
 def configure(conf):
     default_static_modules = []
diff --git a/source4/dsdb/samdb/ldb_modules/wscript b/source4/dsdb/samdb/ldb_modules/wscript
index 52dd9c111fa..ef984ccbe34 100644
--- a/source4/dsdb/samdb/ldb_modules/wscript
+++ b/source4/dsdb/samdb/ldb_modules/wscript
@@ -8,7 +8,7 @@ def options(opt):
     help += "This requires gpgme devel and python packages "
     help += "(e.g. libgpgme11-dev, python-gpgme on debian/ubuntu)."
 
-    opt.SAMBA3_ADD_OPTION('gpgme', default=True, help=(help))
+    opt.samba_add_onoff_option('gpgme', default=True, help=(help))
 
     return
 
-- 
2.13.7




More information about the samba-technical mailing list