aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/buildgen
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-05 16:05:46 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-05 16:05:46 -0700
commitd1697d99d775bddd4f81fb1239eb415eeccc317f (patch)
tree6760c01fbdfa39a51194cdf064320e83adce1d4e /tools/buildgen
parent978161549032df14c24b6409554d1af6f28b45cd (diff)
Getting dependencies fixed up
Diffstat (limited to 'tools/buildgen')
-rwxr-xr-xtools/buildgen/plugins/expand_filegroups.py28
1 files changed, 26 insertions, 2 deletions
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']: