summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_deps.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-17 10:58:07 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:50 +1000
commite6f7a13a17b30d2a266924d8099c77ea47f4d500 (patch)
treee3a14507652e6c51a844fb35ccc28515a84ed26e /buildtools/wafsamba/samba_deps.py
parente4104eb085d579893a5bb5e5ae8ee02804dc7cfd (diff)
downloadsamba-e6f7a13a17b30d2a266924d8099c77ea47f4d500.tar.gz
samba-e6f7a13a17b30d2a266924d8099c77ea47f4d500.tar.bz2
samba-e6f7a13a17b30d2a266924d8099c77ea47f4d500.zip
build: try faster includes processing
Diffstat (limited to 'buildtools/wafsamba/samba_deps.py')
-rw-r--r--buildtools/wafsamba/samba_deps.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index cc013eed6b..24807f844e 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -146,9 +146,9 @@ def build_includes(self):
if getattr(self, 'local_include', True) == True and not getattr(self, 'local_include_first', True):
includes.append('.')
- self.includes = unique_list(includes)
- debug('deps: includes for target %s: includes=%s',
- self.sname, self.includes)
+ self.env['INC_PATHS'] = unique_list(includes)
+ debug('deps: includes for target %s: INC_PATHS=%s',
+ self.sname, self.env['INC_PATHS'])
@@ -572,9 +572,10 @@ def calculate_final_deps(bld, tgt_list):
######################################################################
# this provides a way to save our dependency calculations between runs
-savedeps_version = 1
+savedeps_version = 2
savedeps_inputs = ['samba_deps', 'samba_includes', 'local_include', 'local_include_first', 'samba_cflags']
savedeps_outputs = ['uselib', 'uselib_local', 'add_objects', 'includes', 'ccflags']
+savedeps_outenv = ['INC_PATHS']
savedeps_caches = ['GLOBAL_DEPENDENCIES', 'TARGET_ALIAS', 'TARGET_TYPE', 'INIT_FUNCTIONS']
def save_samba_deps(bld, tgt_list):
@@ -587,6 +588,7 @@ def save_samba_deps(bld, tgt_list):
denv.savedeps_outputs = savedeps_outputs
denv.input = {}
denv.output = {}
+ denv.outenv = {}
denv.caches = {}
for c in savedeps_caches:
@@ -611,6 +613,13 @@ def save_samba_deps(bld, tgt_list):
if tdeps != {}:
denv.output[t.sname] = tdeps
+ tdeps = {}
+ for attr in savedeps_outenv:
+ if attr in t.env:
+ tdeps[attr] = t.env[attr]
+ if tdeps != {}:
+ denv.outenv[t.sname] = tdeps
+
depsfile = os.path.join(bld.bdir, "sambadeps")
denv.store(depsfile)
@@ -656,6 +665,13 @@ def load_samba_deps(bld, tgt_list):
for a in tdeps:
setattr(t, a, tdeps[a])
+ # put output env vars in place
+ for t in tgt_list:
+ if not t.sname in denv.outenv: continue
+ tdeps = denv.outenv[t.sname]
+ for a in tdeps:
+ t.env[a] = tdeps[a]
+
debug('deps: loaded saved dependencies')
return True