summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-30 20:21:21 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:18 +1000
commitb498378c8fcb2f87f7cb296e4e81ac392b1e34ff (patch)
treed8ac3fdd2142bebf9fc8a29f0581fe564227aebf
parent20a8574717aef8f946ac9d8f3284e7318eeb9bf8 (diff)
downloadsamba-b498378c8fcb2f87f7cb296e4e81ac392b1e34ff.tar.gz
samba-b498378c8fcb2f87f7cb296e4e81ac392b1e34ff.tar.bz2
samba-b498378c8fcb2f87f7cb296e4e81ac392b1e34ff.zip
s4-waf: fixed some of the group ordering
We need to try to keep targets in the right groups
-rw-r--r--buildtools/wafsamba/samba_utils.py28
-rw-r--r--buildtools/wafsamba/wafsamba.py9
-rw-r--r--lib/replace/wscript9
-rw-r--r--source4/heimdal_build/wscript_build7
4 files changed, 39 insertions, 14 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 4230d8066f..5bff769400 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -241,22 +241,36 @@ def ENFORCE_GROUP_ORDERING(bld):
if Options.options.compile_targets:
@feature('*')
def force_previous_groups(self):
- my_id = id(self)
+ if getattr(self.bld, 'enforced_group_ordering', False) == True:
+ return
+ self.bld.enforced_group_ordering = True
+
+ def group_name(g):
+ tm = self.bld.task_manager
+ return [x for x in tm.groups_names if id(tm.groups_names[x]) == id(g)][0]
+ my_id = id(self)
bld = self.bld
stop = None
for g in bld.task_manager.groups:
for t in g.tasks_gen:
if id(t) == my_id:
stop = id(g)
+ debug('group: Forcing up to group %s', group_name(g))
break
- if stop is None:
- return
+ if stop != None:
+ break
+ if stop is None:
+ return
- for g in bld.task_manager.groups:
- if id(g) == stop:
- break
- for t in g.tasks_gen:
+ for g in bld.task_manager.groups:
+ if id(g) == stop:
+ break
+ debug('group: Forcing group %s', group_name(g))
+ for t in g.tasks_gen:
+ if getattr(t, 'forced_groups', False) != True:
+ debug('group: Posting %s', t.name or t.target)
+ t.forced_groups = True
t.post()
Build.BuildContext.ENFORCE_GROUP_ORDERING = ENFORCE_GROUP_ORDERING
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 2f3120d6e9..3f48de4ca6 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -252,8 +252,6 @@ def SAMBA_BINARY(bld, binname, source,
if needs_python:
features += ' pyembed'
- bld.SET_BUILD_GROUP(group)
-
obj_target = binname + '.objlist'
source = bld.EXPAND_VARIABLES(source, vars=vars)
@@ -272,6 +270,8 @@ def SAMBA_BINARY(bld, binname, source,
needs_python = needs_python,
local_include = local_include)
+ bld.SET_BUILD_GROUP(group)
+
# the library itself will depend on that object target
deps = TO_LIST(deps)
deps.append(obj_target)
@@ -484,7 +484,7 @@ Build.BuildContext.SAMBA_SUBSYSTEM = SAMBA_SUBSYSTEM
def SAMBA_GENERATOR(bld, name, rule, source, target,
- group='build_source', enabled=True,
+ group='generators', enabled=True,
public_headers=None,
header_path=None,
vars=None):
@@ -535,6 +535,9 @@ def SETUP_BUILD_GROUPS(bld):
bld.add_group('setup')
bld.add_group('build_compiler_source')
bld.add_group('base_libraries')
+ bld.add_group('generators')
+ bld.add_group('compiler_prototypes')
+ bld.add_group('compiler_libraries')
bld.add_group('build_compilers')
bld.add_group('build_source')
bld.add_group('prototypes')
diff --git a/lib/replace/wscript b/lib/replace/wscript
index bdfea8712f..cc718939e1 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -316,15 +316,20 @@ def build(bld):
if not bld.CONFIG_SET('HAVE_SOCKETPAIR'): NET_SOURCES.append('socketpair.c')
if not bld.CONFIG_SET('HAVE_GETADDRINFO'):NET_SOURCES.append('getaddrinfo.c')
- bld.SAMBA_SUBSYSTEM('LIBREPLACE_NETWORK', NET_SOURCES, deps='replace')
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_NETWORK', NET_SOURCES,
+ group='base_libraries',
+ deps='replace')
CRYPT_SOURCES = []
if not 'HAVE_CRYPT' in bld.env: CRYPT_SOURCES.append('crypt.c')
- bld.SAMBA_SUBSYSTEM('LIBREPLACE_EXT', CRYPT_SOURCES)
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_EXT',
+ CRYPT_SOURCES,
+ group='base_libraries')
bld.SAMBA_SUBSYSTEM('LIBREPLACE_GETPASS', 'getpass.c',
+ group='base_libraries',
enabled=bld.CONFIG_SET('REPLACE_GETPASS'))
# build replacements for stdint.h and stdbool.h if needed
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index c70e719e43..70c57f2b0a 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -369,6 +369,7 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME_H',
cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
includes='../heimdal/lib/roken',
deps='replace',
+ group='compiler_libraries',
enabled=not bld.CONFIG_SET('HAVE_GETPROGNAME')
)
@@ -378,6 +379,7 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM_H',
cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
includes='../heimdal/lib/roken',
deps='replace',
+ group='compiler_libraries',
enabled=not bld.CONFIG_SET('HAVE_CLOSEFROM')
)
@@ -386,6 +388,7 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_H',
'../heimdal/lib/roken/base64.c ../heimdal/lib/roken/ct.c ../heimdal/lib/roken/hex.c ../heimdal/lib/roken/bswap.c ../heimdal/lib/roken/dumpdata.c ../heimdal/lib/roken/emalloc.c ../heimdal/lib/roken/ecalloc.c ../heimdal/lib/roken/getarg.c ../heimdal/lib/roken/get_window_size.c ../heimdal/lib/roken/getdtablesize.c ../heimdal/lib/roken/h_errno.c ../heimdal/lib/roken/issuid.c ../heimdal/lib/roken/net_read.c ../heimdal/lib/roken/net_write.c ../heimdal/lib/roken/socket.c ../heimdal/lib/roken/parse_time.c ../heimdal/lib/roken/parse_units.c ../heimdal/lib/roken/resolve.c ../heimdal/lib/roken/roken_gethostby.c ../heimdal/lib/roken/signal.c ../heimdal/lib/roken/vis.c ../heimdal/lib/roken/strlwr.c ../heimdal/lib/roken/strsep_copy.c ../heimdal/lib/roken/strsep.c ../heimdal/lib/roken/strupr.c ../heimdal/lib/roken/strpool.c ../heimdal/lib/roken/estrdup.c ../heimdal/lib/roken/erealloc.c ../heimdal/lib/roken/simple_exec.c ../heimdal/lib/roken/strcollect.c ../heimdal/lib/roken/strerror_r.c ../heimdal/lib/roken/rtbl.c ../heimdal/lib/roken/cloexec.c ../heimdal/lib/roken/xfree.c replace.c',
includes='../heimdal/lib/roken',
cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
+ group='compiler_libraries',
deps='HEIMDAL_ROKEN_PROGNAME_H HEIMDAL_ROKEN_CLOSEFROM_H resolv LIBREPLACE_NETWORK'
)
@@ -559,12 +562,12 @@ HEIMDAL_HEIM_ASN1_DER_SOURCE = '''
bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-protos.h',
HEIMDAL_HEIM_ASN1_DER_SOURCE,
- group = 'build_compilers',
+ group = 'compiler_prototypes',
options="-q -P comment -o")
bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-private.h',
HEIMDAL_HEIM_ASN1_DER_SOURCE,
- group = 'build_compilers',
+ group = 'compiler_prototypes',
options="-q -P comment -p")