| 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..7a70bcb851502bbcce860b3576c66d2bac7a3def 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,18 @@ 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 %s.' % cls.SELECTOR)
|
| + )
|
| +
|
| def UpdateContext(self):
|
| """Update the context if needed.
|
|
|
|
|