Chromium Code Reviews| Index: pylib/gyp/__init__.py |
| diff --git a/pylib/gyp/__init__.py b/pylib/gyp/__init__.py |
| index ba1ca07ba51a6636adcb20036cd06e731a2f6cf4..4aae35605116215f93178256ac4dcebad7c79f75 100755 |
| --- a/pylib/gyp/__init__.py |
| +++ b/pylib/gyp/__init__.py |
| @@ -314,6 +314,8 @@ def gyp_main(args): |
| parser.add_option('--toplevel-dir', dest='toplevel_dir', action='store', |
| default=None, metavar='DIR', type='path', |
| help='directory to use as the root of the source tree') |
| + parser.add_option('--build', dest='configs', action='append', |
| + help='configuration for build after project generation') |
| # --no-circular-check disables the check for circular relationships between |
| # .gyp files. These relationships should not exist, but they've only been |
| # observed to be harmful with the Xcode generator. Chromium's .gyp files |
| @@ -496,6 +498,13 @@ def gyp_main(args): |
| # generate targets in the order specified in flat_list. |
| generator.GenerateOutput(flat_list, targets, data, params) |
| + if options.configs: |
| + valid_configs = targets[flat_list[0]]['configurations'].keys() |
| + for conf in options.configs: |
| + if conf not in valid_configs: |
| + raise GypError("Invalid config specified via --build: %s" % conf) |
|
bradn
2012/09/18 00:22:39
single quotes
Sam Clegg
2012/09/18 00:47:17
Done.
|
| + generator.PerformBuild(data, options.configs, params) |
| + |
| # Done |
| return 0 |