| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 cStringIO | 6 import cStringIO |
| 7 import optparse | 7 import optparse |
| 8 import os | 8 import os |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 'attrs': | 275 'attrs': |
| 276 'data-name="%s" data-tools="%s" data-configs="%s" data-path="%s"' % ( | 276 'data-name="%s" data-tools="%s" data-configs="%s" data-path="%s"' % ( |
| 277 name, ' '.join(tools), ' '.join(configs), path), | 277 name, ' '.join(tools), ' '.join(configs), path), |
| 278 } | 278 } |
| 279 RunTemplateFile(srcfile, dstfile, replace) | 279 RunTemplateFile(srcfile, dstfile, replace) |
| 280 | 280 |
| 281 | 281 |
| 282 def LoadProject(filename, toolchains): | 282 def LoadProject(filename, toolchains): |
| 283 """Generate a Master Makefile that builds all examples. | 283 """Generate a Master Makefile that builds all examples. |
| 284 | 284 |
| 285 Load a project desciption file, verifying it conforms and checking | 285 Load a project description file, verifying it conforms and checking |
| 286 if it matches the set of requested toolchains. Return None if the | 286 if it matches the set of requested toolchains. Return None if the |
| 287 project is filtered out.""" | 287 project is filtered out.""" |
| 288 | 288 |
| 289 Trace('Processing %s...' % filename) | 289 Trace('Processing %s...' % filename) |
| 290 # Default src directory is the directory the description was found in | 290 # Default src directory is the directory the description was found in |
| 291 desc = open(filename, 'r').read() | 291 desc = open(filename, 'r').read() |
| 292 desc = eval(desc, {}, {}) | 292 desc = eval(desc, {}, {}) |
| 293 | 293 |
| 294 # Verify the format of this file | 294 # Verify the format of this file |
| 295 if not ValidateFormat(desc, DSC_FORMAT): | 295 if not ValidateFormat(desc, DSC_FORMAT): |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 for dest, projects in master_projects.iteritems(): | 494 for dest, projects in master_projects.iteritems(): |
| 495 master_out = os.path.join(options.dstroot, dest, 'Makefile') | 495 master_out = os.path.join(options.dstroot, dest, 'Makefile') |
| 496 GenerateMasterMakefile(master_in, master_out, projects) | 496 GenerateMasterMakefile(master_in, master_out, projects) |
| 497 | 497 |
| 498 return 0 | 498 return 0 |
| 499 | 499 |
| 500 | 500 |
| 501 if __name__ == '__main__': | 501 if __name__ == '__main__': |
| 502 sys.exit(main(sys.argv[1:])) | 502 sys.exit(main(sys.argv[1:])) |
| 503 | 503 |
| OLD | NEW |