1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/libcli/smb/wscript

80 lines
2.2 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env python
def build(bld):
bld.SAMBA_LIBRARY('smb_transport',
source='''
read_smb.c
''',
deps='LIBASYNC_REQ',
public_deps='talloc tevent',
private_library=True,
private_headers='''
read_smb.h
''',
)
bld.SAMBA_LIBRARY('cli_smb_common',
source='''
smb_signing.c
smb_seal.c
smb2_negotiate_context.c
smb2_create_blob.c smb2_signing.c
smb2_lease.c
util.c
smbXcli_base.c
smb1cli_trans.c
smb1cli_echo.c
smb1cli_create.c
smb1cli_session.c
smb1cli_close.c
smb1cli_write.c
smb1cli_read.c
smb2cli_session.c
smb2cli_tcon.c
smb2cli_create.c
smb2cli_close.c
smb2cli_read.c
smb2cli_write.c
smb2cli_flush.c
smb2cli_set_info.c
smb2cli_query_info.c
smb2cli_notify.c
smb2cli_query_directory.c
smb2cli_ioctl.c
smb2cli_echo.c
smb2_posix.c
tstream_smbXcli_np.c
''',
deps='''
LIBCRYPTO gnutls NDR_SMB2_LEASE_STRUCT samba-errors gensec krb5samba
smb_transport GNUTLS_HELPERS
''',
public_deps='talloc samba-util iov_buf',
private_library=True,
private_headers='''
smb_common.h
smb2_constants.h
smb_constants.h
smb_signing.h
smb_seal.h
smb2_create_blob.h
smb2_signing.h
smb2_lease.h
smb_util.h
smb_unix_ext.h
smb_posix.h
tstream_smbXcli_np.h
''',
)
bld.SAMBA_BINARY('test_smb1cli_session',
source='test_smb1cli_session.c',
deps='cmocka cli_smb_common',
build: Do not build selftest binaries for builds without --enable-selftest Add new for_selftest option to SAMBA_BINARY() and SAMBA3_BINARY() This allows us to be much more consistent (at least in the core Samba) and documents clearly why the binary should not be installed. Not modified are - test_lp_load - notifyd-tests - gendrandperf - test* from examples/libsmbclient - dbwrap_torture - split_tokens - locktest2 - msgtest - msg_sink - msg_source - versiontest - rpc_open_tcp - test_headers As these are not tested in selftest so any change would also be untested. Of course they probably should be added in a different MR. Also not modified (because they are not tests, nor part of the build system) are: - smb2mount - notifydd - log2pacp - debug2html - smbfilter - destroy_netlogon_creds_cli - spotlight2* - tevent_glib_tracker These do however appear to be untested. For now, the source4 forked client tools are left unchanged: - smbclient4 - nmblookup4 Finally, the heimdal binaries are left as install=False as they are either part of the build system or end-user tools that we just don't want to install. These are however tested. The motivation is commit like c34ec003b7d45aa4196ff93a0ac29694b25e5309 and da87fa998ab71328f30bcdf5b41aee8675aee48a, which are both totally correct but are not needed if the selftest is not run on MacOS. There are likely other platforms or build environments where building our test binaries is more pain than valuable, see for example also https://lists.samba.org/archive/samba/2019-November/227137.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Nov 22 11:48:59 UTC 2019 on sn-devel-184
2019-11-22 00:06:57 +03:00
for_selftest=True)
bld.SAMBA_BINARY('test_util_translate',
source='test_util_translate.c',
deps='cmocka cli_smb_common',
for_selftest=True)