From e4104eb085d579893a5bb5e5ae8ee02804dc7cfd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Mar 2010 09:55:41 +1100 Subject: build: more efficient pidl rules from ita Don't re-scan the pidl source tree each time --- buildtools/wafsamba/samba_pidl.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'buildtools/wafsamba/samba_pidl.py') 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) -- cgit