Chromium Code Reviews| Index: tools/cr/cr/commands/prepare.py |
| diff --git a/tools/cr/cr/commands/prepare.py b/tools/cr/cr/commands/prepare.py |
| index ba3956ab9eb30b276544fdba918417b234bd530f..28bf2cf662066298e9ba3daad3529ba9b7447bfa 100644 |
| --- a/tools/cr/cr/commands/prepare.py |
| +++ b/tools/cr/cr/commands/prepare.py |
| @@ -31,14 +31,12 @@ class PrepareCommand(cr.Command): |
| @classmethod |
| def UpdateContext(cls): |
| - for preparation in PrepareOut.Plugins(): |
| - preparation.UpdateContext() |
| + PrepareOut.GetActivePlugin().UpdateContext() |
| @classmethod |
| def Prepare(cls): |
| cls.UpdateContext() |
| - for preparation in PrepareOut.Plugins(): |
| - preparation.Prepare() |
| + PrepareOut.GetActivePlugin().Prepare() |
| class PrepareOut(cr.Plugin, cr.Plugin.Type): |
| @@ -47,6 +45,17 @@ class PrepareOut(cr.Plugin, cr.Plugin.Type): |
| See PrepareCommand for details. |
| """ |
| + SELECTOR = 'CR_GENERATOR' |
| + |
| + @classmethod |
| + def AddArguments(cls, parser): |
| + parser.add_argument( |
| + '--generator', dest=cls.SELECTOR, |
| + choices=cls.Choices(), |
| + default=None, |
| + help='Sets the build file generator to use. Overrides ' + cls.SELECTOR |
|
petrcermak
2015/04/17 16:14:54
nit: Should probably add a full stop at the end of
Sami
2015/04/17 16:20:34
Done.
|
| + ) |
| + |
| def UpdateContext(self): |
| """Update the context if needed. |