From: Andrew Bartlett Date: Mon, 4 Nov 2019 01:42:24 +0000 (+1300) Subject: heimdal_build: Recurse to bld.SAMBA_BINARY() X-Git-Tag: talloc-2.3.1~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc5db1e8d819f442060015bc93a132cc4b3f7ad9;p=thirdparty%2Fsamba.git heimdal_build: Recurse to bld.SAMBA_BINARY() This reduces a little of the duplication added when it was thought that having a distinct waf wrapper on heimdal might allow this to be ported upstream. It will also streamline building a dedicated fuzzing mode in Samba. Signed-off-by: Andrew Bartlett Reviewed-by: David Mulder Reviewed-by: Andreas Schneider --- diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 48e56493489..7081f382eaa 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -354,6 +354,7 @@ def SAMBA_BINARY(bld, binname, source, local_include=True, global_include=True, subsystem_name=None, + allow_warnings=False, pyembed=False, vars=None, subdir=None, @@ -382,6 +383,8 @@ def SAMBA_BINARY(bld, binname, source, if group == 'binaries': subsystem_group = 'main' + elif group == 'build_compilers': + subsystem_group = 'compiler_libraries' else: subsystem_group = group @@ -410,6 +413,7 @@ def SAMBA_BINARY(bld, binname, source, global_include = global_include, use_hostcc = use_hostcc, pyext = pyembed, + allow_warnings = allow_warnings, use_global_deps= use_global_deps) bld.SET_BUILD_GROUP(group) diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build index 163b622fca9..c9a974ca0fb 100644 --- a/source4/heimdal_build/wscript_build +++ b/source4/heimdal_build/wscript_build @@ -314,47 +314,19 @@ def HEIMDAL_BINARY(binname, source, install_path=None): '''define a Samba binary''' - if not SET_TARGET_TYPE(bld, binname, 'BINARY'): - return - - features = 'c cprogram symlink_bin install_bin' - - obj_target = binname + '.objlist' - - if group == 'build_compilers': - subsystem_group = 'compiler_libraries' - else: - subsystem_group = group - - # first create a target for building the object files for this binary - # by separating in this way, we avoid recompiling the C files - # separately for the install binary and the build binary - HEIMDAL_SUBSYSTEM(obj_target, - source = source, - deps = deps, - includes = includes, - cflags = cflags, - group = subsystem_group, - use_hostcc = use_hostcc, - use_global_deps= use_global_deps) - - bld.set_group(group) - - # the binary itself will depend on that object target - deps = to_list(deps) - deps.append(obj_target) + source = heimdal_paths(source) - t = bld( - features = features, - source = [], - target = binname, - samba_deps = deps, - samba_includes = includes, - local_include = True, - top = True, - install_path = None, - samba_install = install - ) + bld.SAMBA_BINARY(binname, + source = source, + deps = deps, + includes = includes, + cflags = cflags, + group = group, + use_hostcc = use_hostcc, + use_global_deps= use_global_deps, + install_path = None, + install = install, + allow_warnings = True) if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):