Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: mojom/tools/build_generators.py

Issue 1916133003: Fix the build script to be able to build more than one generator. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/tools/build_generators.py
diff --git a/mojom/tools/build_generators.py b/mojom/tools/build_generators.py
index 9663e9333ec9eb13b2f5f60c2131fa3e38d3a07a..9e1d8bfcfc095166bf5ee412601c580b43ae3999 100755
--- a/mojom/tools/build_generators.py
+++ b/mojom/tools/build_generators.py
@@ -15,13 +15,18 @@ import builder
def main():
- parser = builder.get_arg_parser("Build the mojom generators.")
+ parser = builder.get_arg_parser('Build the mojom generators.')
+ parser.add_argument('--generators', dest='generators', type=str, default=None,
+ action='store', help='')
rudominer 2016/04/25 23:16:05 I think a help string with an example would be use
azani 2016/04/26 00:03:27 Woops, I forgot the help string. Right now, there
args = parser.parse_args()
generators = [
'deps',
rudominer 2016/04/25 23:16:05 The default should be to build all of the generato
azani 2016/04/26 00:03:27 It is.
]
+ if args.generators:
+ generators = args.generators.split(',')
+
final_result = 0
for generator in generators:
generator_builder = builder.get_builder(
@@ -38,7 +43,7 @@ def main():
if not args.keep_going:
return result
- return final_result
+ return final_result
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698