From: Amitay Isaacs Date: Thu, 2 Jun 2016 07:17:19 +0000 (+1000) Subject: lib/util: Avoid splitting tevent-unix-util as public library X-Git-Tag: tdb-1.3.10~982 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2082c0c3b5b62286d111d91c56541710ecc0ffa1;p=thirdparty%2Fsamba.git lib/util: Avoid splitting tevent-unix-util as public library BUG: https://bugzilla.samba.org/show_bug.cgi?id=11946 Commit 670db6ac1d678babd25dd82c4467c0f094cfabc5 split tevent-util public library to create tevent-unix-util public library for standalone ctdb use. This created a public library dependency between samba and ctdb for packaging. Bundle tevent_unix.c in public library tevent-util as before. However, to avoid the dependencies for packaging, standalone ctdb build will build tevent-util as a private library with only tevent_unix.c This simplifies any new subsystems (or libraries) which need tevent-util and are linked in both samba and ctdb. Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke --- diff --git a/ctdb/wscript b/ctdb/wscript index cf60e8629f6..744ba966cc9 100755 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -341,7 +341,7 @@ def build(bld): '''db_hash.c srvid.c reqid.c pkt_read.c pkt_write.c comm.c logging.c rb_tree.c'''), - deps='replace talloc tevent tdb tevent-unix-util') + deps='replace talloc tevent tdb tevent-util') bld.SAMBA_SUBSYSTEM('ctdb-protocol', source=bld.SUBDIR('protocol', @@ -654,7 +654,7 @@ def build(bld): bld.SAMBA_BINARY(target, source=src, - deps='talloc tevent tdb tevent-unix-util', + deps='talloc tevent tdb tevent-util', install_path='${CTDB_TEST_LIBDIR}') bld.SAMBA_BINARY('reqid_test', @@ -708,7 +708,7 @@ def build(bld): bld.SAMBA_BINARY('fake_ctdbd', source='tests/src/fake_ctdbd.c', deps='''ctdb-util ctdb-protocol ctdb-system - samba-util tevent-unix-util popt''', + samba-util tevent-util popt''', install_path='${CTDB_TEST_LIBDIR}') if bld.env.HAVE_INFINIBAND: diff --git a/lib/util/wscript_build b/lib/util/wscript_build index aa0586ca6e3..713946d27a5 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -70,16 +70,15 @@ bld.SAMBA_SUBSYSTEM('samba-util-core', tevent execinfo pthread strv''', local_include=False) -bld.SAMBA_LIBRARY('tevent-unix-util', - source='tevent_unix.c', - local_include=False, - deps='tevent', - public_headers='tevent_unix.h', - header_path=[ ('*', 'util') ], - pc_files=[], - vnum='0.0.1') +if bld.env.SAMBA_UTIL_CORE_ONLY: + + bld.SAMBA_LIBRARY('tevent-util', + source='tevent_unix.c', + local_include=False, + deps='tevent', + private_library=True) -if not bld.env.SAMBA_UTIL_CORE_ONLY: +else: bld.env.public_headers_skip.append('charset_compat.h') @@ -143,10 +142,10 @@ if not bld.env.SAMBA_UTIL_CORE_ONLY: ) bld.SAMBA_LIBRARY('tevent-util', - source='tevent_ntstatus.c tevent_werror.c', + source='tevent_unix.c tevent_ntstatus.c tevent_werror.c', local_include=False, - public_deps='tevent samba-errors tevent-unix-util', - public_headers='tevent_ntstatus.h tevent_werror.h', + public_deps='tevent samba-errors', + public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h', header_path=[ ('*', 'util') ], pc_files=[], vnum='0.0.1'