summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-17 11:46:14 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:50 +1000
commitfb2d78954d1cd73e214589c92de8a05e24ecef14 (patch)
tree4a45446f2ab106ff3d9a120143784426309cc23a /buildtools
parente6f7a13a17b30d2a266924d8099c77ea47f4d500 (diff)
downloadsamba-fb2d78954d1cd73e214589c92de8a05e24ecef14.tar.gz
samba-fb2d78954d1cd73e214589c92de8a05e24ecef14.tar.bz2
samba-fb2d78954d1cd73e214589c92de8a05e24ecef14.zip
build: allow waf to cache include lists more efficiently
Using include paths all based on the topdir is more efficient
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_deps.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 24807f844e..f20bccba06 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -146,9 +146,23 @@ def build_includes(self):
if getattr(self, 'local_include', True) == True and not getattr(self, 'local_include_first', True):
includes.append('.')
- self.env['INC_PATHS'] = unique_list(includes)
- debug('deps: includes for target %s: INC_PATHS=%s',
- self.sname, self.env['INC_PATHS'])
+ # now transform the includes list to be relative to the top directory
+ # which is represented by '#' in waf. This allows waf to cache the
+ # includes lists more efficiently
+ includes_top = []
+ for i in includes:
+ if i[0] == '#':
+ # some are already top based
+ includes_top.append(i)
+ continue
+ absinc = os.path.join(self.path.abspath(), i)
+ relinc = os_path_relpath(absinc, self.bld.srcnode.abspath())
+ includes_top.append('#' + relinc)
+
+ self.includes = unique_list(includes_top)
+ debug('deps: includes for target %s: includes=%s',
+ self.sname, self.includes)
+