OLD | NEW |
| (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 # Fix filename escaping issues on Windows. | |
23 base = base.replace("\\", "/") | |
24 print base + ".mojom.cc" | |
25 print base + ".mojom.h" | |
26 print base + ".mojom-internal.h" | |
27 print base + ".mojom.js" | |
28 print base + ".mojom.sky" | |
29 print base + "_mojom.py" | |
30 | |
31 return 0 | |
32 | |
33 if __name__ == "__main__": | |
34 sys.exit(main()) | |
OLD | NEW |