summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-30 11:07:40 +1100
committerAndrew Tridgell <tridge@samba.org>2010-10-30 23:49:00 +1100
commitdf34bb268566ea86f2b77ed7bb04983b8c05e4c3 (patch)
tree9b2c35ba4c34cd135ce9f540633da405dde4af36
parent170c255f09a3d629bba86cf62c6a0cf81ff81bf1 (diff)
downloadsamba-df34bb268566ea86f2b77ed7bb04983b8c05e4c3.tar.gz
samba-df34bb268566ea86f2b77ed7bb04983b8c05e4c3.tar.bz2
samba-df34bb268566ea86f2b77ed7bb04983b8c05e4c3.zip
waf: build all libraries after all object files
this makes it easier to perform symbol checking before the link stage. The two new build groups symbolcheck and syslibcheck will be used by the symbols.py extension
-rw-r--r--buildtools/wafsamba/wafsamba.py24
-rw-r--r--source4/heimdal_build/wscript_build9
2 files changed, 24 insertions, 9 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index d4acd19ba5..e6d3ef0d50 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -27,6 +27,7 @@ import generic_cc
import samba_dist
import samba_wildcard
import stale_files
+import symbols
# some systems have broken threading in python
if os.environ.get('WAF_NOTHREADS') == '1':
@@ -102,7 +103,7 @@ def SAMBA_LIBRARY(bld, libname, source,
external_library=False,
realname=None,
autoproto=None,
- group='main',
+ group='libraries',
depends_on='',
local_include=True,
vars=None,
@@ -138,6 +139,11 @@ def SAMBA_LIBRARY(bld, libname, source,
else:
obj_target = libname + '.objlist'
+ if group == 'libraries':
+ subsystem_group = 'main'
+ else:
+ subsystem_group = group
+
# first create a target for building the object files for this library
# by separating in this way, we avoid recompiling the C files
# separately for the install library and the build library
@@ -149,7 +155,7 @@ def SAMBA_LIBRARY(bld, libname, source,
public_headers = public_headers,
header_path = header_path,
cflags = cflags,
- group = group,
+ group = subsystem_group,
autoproto = autoproto,
depends_on = depends_on,
hide_symbols = hide_symbols,
@@ -276,6 +282,11 @@ def SAMBA_BINARY(bld, binname, source,
source = bld.EXPAND_VARIABLES(source, vars=vars)
source = unique_list(TO_LIST(source))
+ if group == 'binaries':
+ subsystem_group = 'main'
+ 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
@@ -284,7 +295,7 @@ def SAMBA_BINARY(bld, binname, source,
deps = deps,
includes = includes,
cflags = cflags,
- group = group,
+ group = subsystem_group,
autoproto = autoproto,
subsystem_name = subsystem_name,
local_include = local_include,
@@ -346,10 +357,6 @@ def SAMBA_MODULE(bld, modname, source,
source = bld.EXPAND_VARIABLES(source, vars=vars)
if internal_module or BUILTIN_LIBRARY(bld, modname):
- # treat internal modules as subsystems for now
- if subsystem is not None:
- deps += ' ' + subsystem
-
bld.SAMBA_SUBSYSTEM(modname, source,
deps=deps,
includes=includes,
@@ -560,7 +567,10 @@ def SETUP_BUILD_GROUPS(bld):
bld.add_group('build_source')
bld.add_group('prototypes')
bld.add_group('main')
+ bld.add_group('symbolcheck')
+ bld.add_group('libraries')
bld.add_group('binaries')
+ bld.add_group('syslibcheck')
bld.add_group('final')
Build.BuildContext.SETUP_BUILD_GROUPS = SETUP_BUILD_GROUPS
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index bd7e7aed14..8d0a8316ed 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -214,7 +214,7 @@ def HEIMDAL_LIBRARY(libname, source, deps, vnum,
features = 'cc cshlib symlink_lib install_lib'
- bld.set_group('main')
+ bld.set_group('libraries')
t = bld(
features = features,
source = [],
@@ -297,6 +297,11 @@ def HEIMDAL_BINARY(binname, source,
obj_target = binname + '.objlist'
+ if group == 'binaries':
+ subsystem_group = 'main'
+ 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
@@ -305,7 +310,7 @@ def HEIMDAL_BINARY(binname, source,
deps = deps,
includes = includes,
cflags = cflags,
- group = group,
+ group = subsystem_group,
use_hostcc = use_hostcc,
use_global_deps= use_global_deps)