summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-17 09:55:41 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:50 +1000
commite4104eb085d579893a5bb5e5ae8ee02804dc7cfd (patch)
tree065174256aced275fc454c8d8ca4da6f974adf5c
parentb09797f30bbceb634935ba8fb86e79b2faa1a7ed (diff)
downloadsamba-e4104eb085d579893a5bb5e5ae8ee02804dc7cfd.tar.gz
samba-e4104eb085d579893a5bb5e5ae8ee02804dc7cfd.tar.bz2
samba-e4104eb085d579893a5bb5e5ae8ee02804dc7cfd.zip
build: more efficient pidl rules from ita
Don't re-scan the pidl source tree each time
-rw-r--r--buildtools/wafsamba/samba_pidl.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index d6077c2a4a..b7839bc0ca 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -46,9 +46,10 @@ def SAMBA_PIDL(bld, pname, source,
# depend on the full pidl sources
source = TO_LIST(source)
- pidl_src = [x.relpath_gen(bld.path) for x in
- bld.srcnode.ant_glob('pidl/**/*', flat=False)]
- source.extend(pidl_src)
+ try:
+ pidl_src_nodes = bld.pidl_files_cache
+ except AttributeError:
+ pidl_src_nodes = bld.pidl_files_cache = bld.srcnode.ant_glob('pidl/**/*', flat=False)
# the cd .. is needed because pidl currently is sensitive to the directory it is run in
t = bld(rule='cd .. && ${PIDL} ${OPTIONS} --outputdir ${OUTPUTDIR} -- ${SRC[0].abspath(env)}',
@@ -59,6 +60,9 @@ def SAMBA_PIDL(bld, pname, source,
target = out_files,
name = name)
+ # prime the list of nodes we are dependent on with the cached pidl sources
+ t.allnodes = pidl_src_nodes
+
t.env.PIDL = "../pidl/pidl"
t.env.OPTIONS = TO_LIST(options)