mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
build.py: Add dep cache (doesn't make a speed difference at all)
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
1760458375
commit
22cba71eeb
1 changed files with 8 additions and 0 deletions
|
|
@ -31,6 +31,12 @@ def find_proj_path(name):
|
|||
raise Exception("module " + name + " not found below " + proj_base)
|
||||
|
||||
def read_deps(cur, prereq_type):
|
||||
# dep cache doesn't make a difference at all
|
||||
if prereq_type in dep_cache:
|
||||
if cur in dep_cache[prereq_type]:
|
||||
return dep_cache[cur][prereq_type]
|
||||
else:
|
||||
dep_cache[prereq_type] = {}
|
||||
path = find_proj_path(cur)
|
||||
os.chdir(path)
|
||||
# ignoring prereq_type, as it has never been anything but BUILD, now
|
||||
|
|
@ -44,6 +50,8 @@ def read_deps(cur, prereq_type):
|
|||
r.add(d)
|
||||
if cur in r:
|
||||
r.remove(cur)
|
||||
print 'inserting', prereq_type, cur, r
|
||||
dep_cache[prereq_type][cur] = r
|
||||
return r
|
||||
|
||||
def add_tree(cur, prereq_type):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue