ctdb-build: Make ctdb-util a wscript build subsystem
authorMartin Schwenke <martin@meltin.net>
Sun, 17 Aug 2014 04:29:32 +0000 (14:29 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 9 Sep 2014 23:36:15 +0000 (01:36 +0200)
This makes it look similar to samba-util, easing the transition.

Fold ctdb-util-misc into ctdb-util, since Samba doesn't separate them.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/lib/util/wscript_build [new file with mode: 0755]
ctdb/wscript

diff --git a/ctdb/lib/util/wscript_build b/ctdb/lib/util/wscript_build
new file mode 100755 (executable)
index 0000000..2435668
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+bld.SAMBA_SUBSYSTEM('ctdb-util',
+                     source='''util.c util_file.c util_time.c db_wrap.c
+                               debug.c fault.c idtree.c signal.c
+                               substitute.c''',
+                      deps='tdb talloc',
+                      public_deps='talloc tevent',
+                      local_include=False,
+                      )
index 81039e61510dc581c1ee1879720151c678f13480..0d56065138932caf168b7410f656be2429f7aa96 100755 (executable)
@@ -173,6 +173,8 @@ def build(bld):
     if bld.CHECK_FOR_THIRD_PARTY():
         bld.RECURSE('third_party/popt')
 
+    bld.RECURSE('lib/util')
+
     bld.RECURSE('lib/talloc')
     bld.RECURSE('lib/tevent')
     bld.RECURSE('lib/tdb')
@@ -184,20 +186,6 @@ def build(bld):
                             dep_vars=['VERSION'])
     t.env.VERSION = VERSION
 
-    bld.SAMBA_SUBSYSTEM('ctdb-util',
-                        source=bld.SUBDIR('lib/util',
-                                          'util.c util_file.c util_time.c'),
-                        includes='include include/internal',
-                        deps='replace talloc tevent tdb')
-
-    bld.SAMBA_SUBSYSTEM('ctdb-util-misc',
-                        source=bld.SUBDIR('lib/util',
-                                          '''db_wrap.c debug.c fault.c
-                                             idtree.c signal.c
-                                             substitute.c'''),
-                        includes='include include/internal lib/util',
-                        deps='replace talloc tevent tdb')
-
     bld.SAMBA_SUBSYSTEM('ctdb-tcp',
                         source=bld.SUBDIR('tcp',
                                           'tcp_connect.c tcp_init.c tcp_io.c'),
@@ -250,7 +238,7 @@ def build(bld):
                         source=bld.SUBDIR('client', 'ctdb_client.c'),
                         includes='include include/internal lib/util',
                         public_headers='include/ctdb_client.h',
-                        deps='replace popt talloc tevent tdb ctdb-util ctdb-util-misc')
+                        deps='replace popt talloc tevent tdb ctdb-util')
 
     bld.SAMBA_SUBSYSTEM('ctdb-server',
                         source='server/ctdbd.c ' +
@@ -300,14 +288,14 @@ def build(bld):
 
     bld.SAMBA_BINARY('ctdb_lock_helper',
                      source='server/ctdb_lock_helper.c',
-                     deps='ctdb-util ctdb-util-misc ctdb-common-util talloc tdb',
+                     deps='ctdb-util ctdb-common-util talloc tdb',
                      includes='include include/internal',
                      install_path='${BINDIR}')
 
     bld.SAMBA_BINARY('ctdb_event_helper',
                      source='server/ctdb_event_helper.c',
                      includes='include include/internal',
-                     deps='ctdb-util ctdb-util-misc ctdb-common-util replace tdb',
+                     deps='ctdb-util ctdb-common-util replace tdb',
                      install_path='${BINDIR}')
 
     bld.SAMBA_GENERATOR('ctdb-smnotify-h',