Index: mojo/public/tools/bindings/mojom_list_outputs.py |
diff --git a/mojo/public/tools/bindings/mojom_list_outputs.py b/mojo/public/tools/bindings/mojom_list_outputs.py |
index ed8bdfa5b34de5512215ed31771cfe9b7d2ad985..267bd8063476a52cd86b7b76b10842caa09e950e 100755 |
--- a/mojo/public/tools/bindings/mojom_list_outputs.py |
+++ b/mojo/public/tools/bindings/mojom_list_outputs.py |
@@ -11,20 +11,32 @@ def main(): |
parser = argparse.ArgumentParser( |
description="GYP helper script for mapping mojoms => generated outputs.") |
parser.add_argument("--basedir", required=True) |
+ parser.add_argument("--variant", required=True) |
parser.add_argument("mojom", nargs="*") |
args = parser.parse_args() |
+ variant = args.variant if args.variant != "none" else None |
+ |
for mojom in args.mojom: |
full = os.path.join("<(SHARED_INTERMEDIATE_DIR)", args.basedir, mojom) |
base, ext = os.path.splitext(full) |
- assert ext == ".mojom", mojom |
+ |
+ # Ignore non-mojom files. |
+ if ext != ".mojom": |
+ continue |
+ |
# Fix filename escaping issues on Windows. |
base = base.replace("\\", "/") |
- print base + ".mojom.cc" |
- print base + ".mojom.h" |
- print base + ".mojom-internal.h" |
- print base + ".mojom.js" |
+ if variant: |
+ print base + ".mojom-%s.cc" % variant |
+ print base + ".mojom-%s.h" % variant |
+ print base + ".mojom-%s-internal.h" % variant |
+ else: |
+ print base + ".mojom.cc" |
+ print base + ".mojom.h" |
+ print base + ".mojom-internal.h" |
+ print base + ".mojom.js" |
return 0 |