Chromium Code Reviews| Index: build/mojom_bindings_generator.gypi |
| diff --git a/build/mojom_bindings_generator.gypi b/build/mojom_bindings_generator.gypi |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a0fbfa7ae68f906c8e53a9b62f8e6a2b7586b5e2 |
| --- /dev/null |
| +++ b/build/mojom_bindings_generator.gypi |
| @@ -0,0 +1,46 @@ |
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
darin (slow to review)
2013/11/11 17:00:03
nit: 2012 -> 2013
Maybe this file should live und
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +{ |
| + 'variables': { |
| + 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/mojom', |
| + }, |
| + 'rules': [ |
| + { |
| + 'rule_name': 'Generate C++ source files from mojom files', |
| + 'extension': 'mojom', |
| + 'variables': { |
| + 'mojom_bindings_generator': |
| + '<(DEPTH)/mojo/public/bindings/mojom_bindings_generator.py', |
| + }, |
| + 'inputs': [ |
| + '<(mojom_bindings_generator)', |
| + '<(DEPTH)/mojo/public/bindings/parser/mojo_parser.py', |
| + '<(DEPTH)/mojo/public/bindings/parser/mojo_translate.py', |
| + '<(DEPTH)/mojo/public/bindings/generators/mojom.py', |
| + '<(DEPTH)/mojo/public/bindings/generators/mojom_data.py', |
| + '<(DEPTH)/mojo/public/bindings/generators/mojom_pack.py', |
| + '<(DEPTH)/mojo/public/bindings/generators/mojom_cpp_generator.py', |
| + ], |
| + 'outputs': [ |
| + '<(output_dir)/<(RULE_INPUT_ROOT).h', |
| + '<(output_dir)/<(RULE_INPUT_ROOT)_internal.h', |
| + '<(output_dir)/<(RULE_INPUT_ROOT).cc', |
| + ], |
| + 'action': [ |
| + 'python', '<@(mojom_bindings_generator)', |
| + '<(RULE_INPUT_PATH)', |
| + '-i', 'mojom', |
| + '-o', '<(output_dir)', |
| + ], |
| + 'message': 'Generating C++ from cpp template <(RULE_INPUT_PATH)', |
|
darin (slow to review)
2013/11/11 17:00:03
nit: maybe just drop the "cpp template" bit.
|
| + 'process_outputs_as_sources': 1, |
| + } |
| + ], |
| + 'include_dirs': [ |
| + '<(DEPTH)', |
| + '<(SHARED_INTERMEDIATE_DIR)', |
| + ], |
| + 'hard_dependency': 1, |
| +} |