summaryrefslogtreecommitdiff
path: root/lib/ccan/wscript
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-07 22:37:52 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-07 18:53:12 +0200
commit35a2d020a0c3b0ba638874bc0cdbd215c76bf606 (patch)
treeafac33a693be2c52f32e0b69a8cb11176f38dee6 /lib/ccan/wscript
parent4c9126daa98cd35a416f435e088943d94823e550 (diff)
downloadsamba-35a2d020a0c3b0ba638874bc0cdbd215c76bf606.tar.gz
samba-35a2d020a0c3b0ba638874bc0cdbd215c76bf606.tar.bz2
samba-35a2d020a0c3b0ba638874bc0cdbd215c76bf606.zip
ccan: Only build ccan-failtest when we are in developer mode
From: Andrew Bartlett <abartlet@samba.org> This code is incredibly useful, but is only needed in test code and may not be perfectly portable. It has compiled on all systems bar Solaris so far, but rather than make it a requirement to build Samba, just keep it for development. Andrew Bartlett Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Thu Jun 7 18:53:12 CEST 2012 on sn-devel-104
Diffstat (limited to 'lib/ccan/wscript')
-rw-r--r--lib/ccan/wscript18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/ccan/wscript b/lib/ccan/wscript
index 24034bb4ac..8a2b3e79b7 100644
--- a/lib/ccan/wscript
+++ b/lib/ccan/wscript
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import Logs, sys
+import Logs, sys, Options
def configure(conf):
conf.DEFINE('HAVE_CCAN', 1)
@@ -121,8 +121,18 @@ def configure(conf):
conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h')
def build(bld):
+
+ for ccan_dir in ["hash", "htable", "ilog", "likely", "list", "read_write_all", "str", "tally", "time"]:
+ bld.SAMBA_SUBSYSTEM('ccan-%s' % ccan_dir,
+ source=bld.path.ant_glob('%s/*.c' % ccan_dir))
+
+ if bld.env.DEVELOPER_MODE:
+ bld.SAMBA_LIBRARY('ccan-failtest',
+ source=bld.path.ant_glob('failtest/*.c'),
+ deps='execinfo ccan ccan-failtest ccan-htable ccan-list ccan-read_write_all ccan-time',
+ private_library=True)
+
bld.SAMBA_LIBRARY('ccan',
- vnum="0.1-init-1161-g661d41f",
- source=bld.path.ant_glob('*/*.c'),
- deps='execinfo',
+ source='',
+ deps='ccan-hash ccan-ilog ccan-likely ccan-tally',
private_library=True)