From f3862b917168ade88a048cdee688986b0479fe37 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 29 Jun 2012 12:09:06 +0930 Subject: ccan: we're subsystems, not a library. Don't expose a libccan.so; it would produce clashes if someone else does the same thing. Unfortunately, if we just change it from a SAMBA_LIBRARY to a SAMBA_SUBSYSTEM, it doesn't create a static library as we'd like, but links all the object files in. This means we get many duplicates (eg. everyone gets a copy of tally, even though only ntdb wants it). So, the solution is twofold: 1) Make the ccan modules separate. 2) Make the ccan modules SAMBA_SUBSYSTEMs not SAMBA_LIBRARYs so we don't build shared libraries which we can't share. 3) Make the places which uses ccan explicit. Signed-off-by: Rusty Russell Autobuild-User(master): Rusty Russell Autobuild-Date(master): Fri Jun 29 06:22:44 CEST 2012 on sn-devel-104 --- lib/ntdb/wscript | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/ntdb') diff --git a/lib/ntdb/wscript b/lib/ntdb/wscript index abf6db3ed0..39802dbf3a 100644 --- a/lib/ntdb/wscript +++ b/lib/ntdb/wscript @@ -139,9 +139,10 @@ def build(bld): summary.c ntdb.c transaction.c traverse.c''' if not bld.CONFIG_SET('USING_SYSTEM_NTDB'): + NTDB_CCAN='ccan-likely ccan-ilog ccan-hash ccan-tally' bld.SAMBA_LIBRARY('ntdb', SRC, - deps='replace ccan', + deps='replace ' + NTDB_CCAN , includes='.', abi_directory='ABI', abi_match='ntdb_*', @@ -179,7 +180,7 @@ def build(bld): # Workaround is to build a private, non-hiding version. bld.SAMBA_SUBSYSTEM('ntdb-testing', SRC, - deps='replace ccan', + deps='replace ' + NTDB_CCAN, includes='.') bld.SAMBA_SUBSYSTEM('ntdb-test-helpers', @@ -190,18 +191,18 @@ def build(bld): deps='replace') bld.SAMBA_SUBSYSTEM('ntdb-api-helpers', bld.env.NTDB_TEST_API_HELPER_SRC, - deps='replace ntdb-testing') + deps='replace') for f in bld.env.NTDB_TEST_RUN_SRC: base = os.path.splitext(os.path.basename(f))[0] bld.SAMBA_BINARY('ntdb-' + base, f, - deps='ccan replace ntdb-test-helpers ntdb-run-helpers ccan-failtest', + deps=NTDB_CCAN + ' ccan-failtest ntdb-test-helpers ntdb-run-helpers', install=False) for f in bld.env.NTDB_TEST_API_SRC: base = os.path.splitext(os.path.basename(f))[0] bld.SAMBA_BINARY('ntdb-' + base, f, - deps='ccan replace ntdb-test-helpers ntdb-api-helpers', + deps='ntdb-test-helpers ntdb-api-helpers ntdb-testing', install=False) if not bld.CONFIG_SET('USING_SYSTEM_PYNTDB'): -- cgit