s4-lsarpc: Don't call lsa_OpenPolicy2 in lsa_LookupSids3.
[mat/samba.git] / wscript
diff --git a/wscript b/wscript
index bceace1346d2b5a36390d067b1c30ce3acac27a5..727374dee2a99565a33d06dc1fbaebcae7699736 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -61,6 +61,11 @@ def set_options(opt):
                    help='enable special build farm options',
                    action='store_true', dest='BUILD_FARM')
 
+    opt.add_option('--disable-ntdb',
+                   help=("disable ntdb"),
+                   action="store_true", dest='disable_ntdb', default=False)
+
+
     opt.tool_options('python') # options for disabling pyc or pyo compilation
     # enable options related to building python extensions
 
@@ -124,7 +129,11 @@ def configure(conf):
     conf.RECURSE('source4/ntvfs/sysdep')
     conf.RECURSE('lib/util')
     conf.RECURSE('lib/ccan')
-    conf.RECURSE('lib/ntdb')
+    conf.env.disable_ntdb = getattr(Options.options, 'disable_ntdb', False)
+    if not Options.options.disable_ntdb:
+        conf.RECURSE('lib/ntdb')
+    else:
+        conf.DEFINE('DISABLE_NTDB', 1)
     conf.RECURSE('lib/zlib')
     conf.RECURSE('lib/util/charset')
     conf.RECURSE('source4/auth')
@@ -173,7 +182,7 @@ def etags(ctx):
     '''build TAGS file using etags'''
     import Utils
     source_root = os.path.dirname(Utils.g_module.root_path)
-    cmd = 'etags $(find %s -name "*.[ch]" | egrep -v \.inst\.)' % source_root
+    cmd = 'rm -f %s/TAGS && (find %s -name "*.[ch]" | egrep -v \.inst\. | xargs -n 100 etags -a)' % (source_root, source_root)
     print("Running: %s" % cmd)
     os.system(cmd)
 
@@ -232,7 +241,18 @@ def wafdocs(ctx):
 
 def dist():
     '''makes a tarball for distribution'''
-    samba_version.load_version(env=None)
+    sambaversion = samba_version.load_version(env=None)
+
+    if sambaversion.IS_SNAPSHOT:
+        # write .distversion file and add to tar
+        f = '.distversion'
+        distversionf = open(f, 'w')
+        for field in sambaversion.vcs_fields:
+            distveroption = field + '=' + str(sambaversion.vcs_fields[field])
+            distversionf.write(distveroption + '\n')
+        distversionf.close()
+        samba_dist.DIST_FILES('.distversion')
+
     samba_dist.dist()
 
 def distcheck():
@@ -240,7 +260,7 @@ def distcheck():
     samba_version.load_version(env=None)
     import Scripting
     d = Scripting.distcheck
-    d(subdir='source4')
+    d()
 
 def wildcard_cmd(cmd):
     '''called on a unknown command'''