| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import collections | 6 import collections |
| 7 import fnmatch | 7 import fnmatch |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 return out | 184 return out |
| 185 | 185 |
| 186 | 186 |
| 187 def PrintProjectTree(tree): | 187 def PrintProjectTree(tree): |
| 188 for key in tree: | 188 for key in tree: |
| 189 print key + ':' | 189 print key + ':' |
| 190 for val in tree[key]: | 190 for val in tree[key]: |
| 191 print '\t' + val['NAME'] | 191 print '\t' + val['NAME'] |
| 192 | 192 |
| 193 | 193 |
| 194 def GenerateProjects(tree): |
| 195 for key in tree: |
| 196 for val in tree[key]: |
| 197 yield key, val |
| 198 |
| 199 |
| 194 def main(argv): | 200 def main(argv): |
| 195 parser = optparse.OptionParser() | 201 parser = optparse.OptionParser() |
| 196 parser.add_option('-e', '--experimental', | 202 parser.add_option('-e', '--experimental', |
| 197 help='build experimental examples and libraries', action='store_true') | 203 help='build experimental examples and libraries', action='store_true') |
| 198 parser.add_option('-t', '--toolchain', | 204 parser.add_option('-t', '--toolchain', |
| 199 help='Build using toolchain. Can be passed more than once.', | 205 help='Build using toolchain. Can be passed more than once.', |
| 200 action='append') | 206 action='append') |
| 201 | 207 |
| 202 options, files = parser.parse_args(argv[1:]) | 208 options, files = parser.parse_args(argv[1:]) |
| 203 filters = {} | 209 filters = {} |
| (...skipping 13 matching lines...) Expand all Loading... |
| 217 except ValidationError as e: | 223 except ValidationError as e: |
| 218 sys.stderr.write(str(e) + '\n') | 224 sys.stderr.write(str(e) + '\n') |
| 219 return 1 | 225 return 1 |
| 220 | 226 |
| 221 PrintProjectTree(tree) | 227 PrintProjectTree(tree) |
| 222 return 0 | 228 return 0 |
| 223 | 229 |
| 224 | 230 |
| 225 if __name__ == '__main__': | 231 if __name__ == '__main__': |
| 226 sys.exit(main(sys.argv)) | 232 sys.exit(main(sys.argv)) |
| OLD | NEW |