From d1697d99d775bddd4f81fb1239eb415eeccc317f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 5 Apr 2016 16:05:46 -0700 Subject: Getting dependencies fixed up --- tools/buildgen/plugins/expand_filegroups.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'tools/buildgen') diff --git a/tools/buildgen/plugins/expand_filegroups.py b/tools/buildgen/plugins/expand_filegroups.py index 14cb616027..735d0c9b2b 100755 --- a/tools/buildgen/plugins/expand_filegroups.py +++ b/tools/buildgen/plugins/expand_filegroups.py @@ -42,7 +42,14 @@ def excluded(filename, exclude_res): return False -FILEGROUP_LISTS = ['src', 'headers', 'public_headers'] +FILEGROUP_LISTS = ['src', 'headers', 'public_headers', 'deps'] + + +FILEGROUP_DEFAULTS = { + 'language': 'c', + 'boringssl': False, + 'zlib': False, +} def mako_plugin(dictionary): @@ -57,7 +64,15 @@ def mako_plugin(dictionary): filegroups_list = dictionary.get('filegroups') filegroups = {} - todo = filegroups_list[:] + for fg in filegroups_list: + for lst in FILEGROUP_LISTS: + fg[lst] = fg.get(lst, []) + fg['own_%s' % lst] = list(fg[lst]) + for attr, val in FILEGROUP_DEFAULTS.iteritems(): + if attr not in fg: + fg[attr] = val + + todo = list(filegroups_list) skips = 0 while todo: @@ -96,9 +111,18 @@ def mako_plugin(dictionary): for lst in FILEGROUP_LISTS: fg[lst] = sorted(list(set(fg.get(lst, [])))) + for tgt in dictionary['targets']: + for lst in FILEGROUP_LISTS: + tgt[lst] = tgt.get(lst, []) + tgt['own_%s' % lst] = list(tgt[lst]) + for lib in libs: assert 'plugins' not in lib plugins = [] + for lst in FILEGROUP_LISTS: + vals = lib.get(lst, []) + lib[lst] = list(vals) + lib['own_%s' % lst] = list(vals) for fg_name in lib.get('filegroups', []): fg = filegroups[fg_name] for plugin in fg['plugins']: -- cgit v1.2.3