1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

lib/util: Factor out subsystem samba-util-core from samba-util

samba-util depends on Samba-specific code.  Exclude this code from
samba-util-core.  When told to, via SAMBA_UTIL_CORE_ONLY, only build
samba-util-core and dependencies.  When SAMBA_UTIL_CORE_ONLY is not
defined then the behaviour should be unchanged.

Standalone builds of CTDB will be done against samba-util-core to
avoid pulling in Samba-specific code.

An alternative would be to remove the Samba-dependent code from
samba-util.  However, some of it is used by OpenChange.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Martin Schwenke 2014-08-15 16:00:32 +10:00 committed by Jeremy Allison
parent db15cc5388
commit 1fd4556917

View File

@ -31,16 +31,27 @@ bld.SAMBA_LIBRARY('socket-blocking',
local_include=False, local_include=False,
private_library=True) private_library=True)
bld.SAMBA_SUBSYSTEM('samba-util-core',
source='''xfile.c data_blob.c util_file.c time.c
signal.c util.c idtree.c fault.c
substitute.c''',
deps='''time-basic samba-debug socket-blocking talloc
tevent execinfo pthread''',
local_include=False)
if not bld.env.SAMBA_UTIL_CORE_ONLY:
bld.SAMBA_LIBRARY('samba-util', bld.SAMBA_LIBRARY('samba-util',
source='''talloc_stack.c smb_threads.c xfile.c data_blob.c source='''talloc_stack.c smb_threads.c
util_file.c time.c rbtree.c rfc1738.c select.c getpass.c rbtree.c rfc1738.c become_daemon.c system.c select.c getpass.c
genrand.c fsusage.c become_daemon.c signal.c system.c genrand.c fsusage.c
params.c util.c util_id.c util_net.c util_strlist.c params.c util_id.c util_net.c
util_paths.c idtree.c idtree_random.c fault.c base64.c util_strlist.c util_paths.c idtree_random.c base64.c
util_str.c util_str_common.c substitute.c ms_fnmatch.c util_str.c util_str_common.c ms_fnmatch.c
server_id.c dprintf.c parmlist.c bitmap.c pidfile.c server_id.c dprintf.c parmlist.c bitmap.c pidfile.c
tevent_debug.c util_process.c memcache.c''', tevent_debug.c util_process.c memcache.c''',
deps='DYNCONFIG time-basic close-low-fd samba-debug tini tiniparser socket-blocking', deps='samba-util-core DYNCONFIG close-low-fd tini tiniparser',
public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd-daemon', public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd-daemon',
public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h', public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h',
header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ], header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],