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

Side by Side Diff: mojo/public/tools/bindings/mojom_list_outputs.py

Issue 665083008: Refactor bindings generation in GYP (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase2 Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import argparse
7 import os.path
8 import sys
9
10 def main():
11 parser = argparse.ArgumentParser(
12 description="GYP helper script for mapping mojoms => generated outputs.")
13 parser.add_argument("--basedir", required=True)
14 parser.add_argument("mojom", nargs="*")
15
16 args = parser.parse_args()
17
18 for mojom in args.mojom:
19 full = os.path.join("<(SHARED_INTERMEDIATE_DIR)", args.basedir, mojom)
20 base, ext = os.path.splitext(full)
21 assert ext == ".mojom", mojom
22 print base + ".mojom.cc"
23 print base + ".mojom.h"
24 print base + ".mojom-internal.h"
25 print base + ".mojom.js"
26 print base + ".mojom.html"
27 print base + "_mojom.py"
28
29 return 0
30
31 if __name__ == "__main__":
32 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698