From 35a2d020a0c3b0ba638874bc0cdbd215c76bf606 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 7 Jun 2012 22:37:52 +0930 Subject: ccan: Only build ccan-failtest when we are in developer mode From: Andrew Bartlett 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 Autobuild-User(master): Rusty Russell Autobuild-Date(master): Thu Jun 7 18:53:12 CEST 2012 on sn-devel-104 --- lib/ccan/wscript | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'lib/ccan') 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) -- cgit