waf: remove the restriction that private libraries must not have a vnum
[nivanova/samba-autobuild/.git] / source4 / lib / ldb / wscript
index 8f431cbfdcc06f0bb6ac6afd2f6258b2efd48e8e..c75525d10620c96dd87110f4b69d8fa8b4d81bb4 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'ldb'
-VERSION = '0.9.19'
+VERSION = '0.9.20'
 
 blddir = 'bin'
 
@@ -72,6 +72,11 @@ def build(bld):
     bld.RECURSE('lib/popt')
     bld.RECURSE('lib/replace')
 
+    if bld.env.standalone_ldb:
+        private_library = False
+    else:
+        private_library = True
+
     LDB_MAP_SRC = bld.SUBDIR('ldb_map',
                              'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c')
 
@@ -102,6 +107,7 @@ def build(bld):
                           source='pyldb_util.c',
                           public_headers='pyldb.h',
                           vnum=VERSION,
+                          private_library=private_library,
                           pc_files='pyldb-util.pc',
                           pyext=True)
 
@@ -113,7 +119,6 @@ def build(bld):
             # the current modules, not the installed ones
             modules_dir = os.path.join(os.getcwd(), 'bin/modules/ldb')
 
-        abi_file = 'ABI/ldb-%s.sigs' % VERSION
         abi_match = '!ldb_*module_ops !ldb_*backend_ops ldb_*'
 
         bld.SAMBA_LIBRARY('ldb',
@@ -124,9 +129,10 @@ def build(bld):
                           'include/ldb_module.h include/ldb_handlers.h',
                           pc_files='ldb.pc',
                           vnum=VERSION,
+                          private_library=private_library,
                           manpages='man/ldb.3',
-                          abi_file = abi_file,
-                         abi_match = abi_match)
+                          abi_directory = 'ABI',
+                          abi_match = abi_match)
 
 
         bld.SAMBA_PYTHON('pyldb', 'pyldb.c',
@@ -206,22 +212,22 @@ def build(bld):
                             'common/ldb.c',
                             deps='tevent',
                             includes='include',
-                            cflags='-DLDB_MODULESDIR=\"%s\"' % modules_dir)
+                            cflags=['-DLDB_MODULESDIR=\"%s\"' % modules_dir])
+
+        LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
+        for t in LDB_TOOLS.split():
+            bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='ldb-cmdline ldb',
+                             manpages='man/%s.1' % t)
+
+        # ldbtest doesn't get installed
+        bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='ldb-cmdline ldb',
+                         install=False)
 
     bld.SAMBA_LIBRARY('ldb-cmdline',
                       source='tools/ldbutil.c tools/cmdline.c',
                       deps='ldb dl popt',
                       private_library=True)
 
-    LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
-    for t in LDB_TOOLS.split():
-        bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='ldb-cmdline ldb',
-                         manpages='man/%s.1' % t)
-
-    # ldbtest doesn't get installed
-    bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='ldb-cmdline',
-                     install=False)
-
 
 def test(ctx):
     '''run ldb testsuite'''
@@ -229,6 +235,7 @@ def test(ctx):
     cmd = 'tests/test-tdb.sh'
     ret = samba_utils.RUN_COMMAND(cmd)
     print("testsuite returned %d" % ret)
+    # FIXME: Run python testsuite
     sys.exit(ret)
 
 def dist():