| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'rules': [ | 6 'rules': [ |
| 7 { | 7 { |
| 8 'rule_name': 'Generate C++, JS and Java source files from mojom files', | 8 'rule_name': 'Generate C++ source files from mojom files', |
| 9 'extension': 'mojom', | 9 'extension': 'mojom', |
| 10 'variables': { | 10 'variables': { |
| 11 # TODO(sky): uncomment this once gyp bug fixed and remove explicit | 11 # TODO(sky): uncomment this once gyp bug fixed and remove explicit |
| 12 # setting everywhere | 12 # setting everywhere |
| 13 # 'mojom_base_output_dir': | 13 # 'mojom_base_output_dir': |
| 14 # '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))', | 14 # '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))', |
| 15 'mojom_bindings_generator': | 15 'mojom_bindings_generator': |
| 16 '<(DEPTH)/mojo/public/tools/bindings/mojom_bindings_generator.py', | 16 '<(DEPTH)/mojo/public/tools/bindings/mojom_bindings_generator.py', |
| 17 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | |
| 18 }, | 17 }, |
| 19 'inputs': [ | 18 'inputs': [ |
| 20 '<(mojom_bindings_generator)', | 19 '<(mojom_bindings_generator)', |
| 21 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/enum_decla
ration.tmpl', | 20 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/enum_decla
ration.tmpl', |
| 22 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/enum_trait
s.tmpl', | 21 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/enum_trait
s.tmpl', |
| 23 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
declaration.tmpl', | 22 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
declaration.tmpl', |
| 24 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
definition.tmpl', | 23 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
definition.tmpl', |
| 25 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
macros.tmpl', | 24 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
macros.tmpl', |
| 26 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
proxy_declaration.tmpl', | 25 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
proxy_declaration.tmpl', |
| 27 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
request_validator_declaration.tmpl', | 26 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
request_validator_declaration.tmpl', |
| 28 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
response_validator_declaration.tmpl', | 27 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
response_validator_declaration.tmpl', |
| 29 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
stub_declaration.tmpl', | 28 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/interface_
stub_declaration.tmpl', |
| 30 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/module.cc.
tmpl', | 29 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/module.cc.
tmpl', |
| 31 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/module.h.t
mpl', | 30 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/module.h.t
mpl', |
| 32 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/module-int
ernal.h.tmpl', | 31 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/module-int
ernal.h.tmpl', |
| 33 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/params_def
inition.tmpl', | 32 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/params_def
inition.tmpl', |
| 34 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_bui
lder_definition.tmpl', | 33 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_bui
lder_definition.tmpl', |
| 35 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_dec
laration.tmpl', | 34 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_dec
laration.tmpl', |
| 36 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_def
inition.tmpl', | 35 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_def
inition.tmpl', |
| 37 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_des
tructor.tmpl', | 36 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_des
tructor.tmpl', |
| 38 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_mac
ros.tmpl', | 37 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/struct_mac
ros.tmpl', |
| 39 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/wrapper_cl
ass_declaration.tmpl', | 38 '<(DEPTH)/mojo/public/tools/bindings/generators/cpp_templates/wrapper_cl
ass_declaration.tmpl', |
| 40 '<(DEPTH)/mojo/public/tools/bindings/generators/java_templates/constant_
definition.tmpl', | |
| 41 '<(DEPTH)/mojo/public/tools/bindings/generators/java_templates/constants
.java.tmpl', | |
| 42 '<(DEPTH)/mojo/public/tools/bindings/generators/java_templates/header.ja
va.tmpl', | |
| 43 '<(DEPTH)/mojo/public/tools/bindings/generators/java_templates/java_macr
os.tmpl', | |
| 44 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/enum_defini
tion.tmpl', | 39 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/enum_defini
tion.tmpl', |
| 45 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/interface_d
efinition.tmpl', | 40 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/interface_d
efinition.tmpl', |
| 46 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module.js.t
mpl', | 41 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module.js.t
mpl', |
| 47 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/struct_defi
nition.tmpl', | 42 '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/struct_defi
nition.tmpl', |
| 48 '<(DEPTH)/mojo/public/tools/bindings/generators/mojom_cpp_generator.py', | 43 '<(DEPTH)/mojo/public/tools/bindings/generators/mojom_cpp_generator.py', |
| 49 '<(DEPTH)/mojo/public/tools/bindings/generators/mojom_java_generator.py'
, | |
| 50 '<(DEPTH)/mojo/public/tools/bindings/generators/mojom_js_generator.py', | 44 '<(DEPTH)/mojo/public/tools/bindings/generators/mojom_js_generator.py', |
| 51 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/__init__.py', | 45 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/__init__.py', |
| 52 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/error.py', | 46 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/error.py', |
| 53 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/__init__.py', | 47 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/__init__.py', |
| 54 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/data.py', | 48 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/data.py', |
| 55 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/generator.py', | 49 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/generator.py', |
| 56 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/module.py', | 50 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/module.py', |
| 57 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/pack.py', | 51 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/pack.py', |
| 58 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/template_expan
der.py', | 52 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/generate/template_expan
der.py', |
| 59 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/__init__.py', | 53 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/__init__.py', |
| 60 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/ast.py', | 54 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/ast.py', |
| 61 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py', | 55 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py', |
| 62 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/parser.py', | 56 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/parser.py', |
| 63 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/translate.py', | 57 '<(DEPTH)/mojo/public/tools/bindings/pylib/mojom/parse/translate.py', |
| 64 ], | 58 ], |
| 65 'outputs': [ | 59 'outputs': [ |
| 66 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.cc', | 60 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.cc', |
| 67 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.h', | 61 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.h', |
| 68 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.js', | 62 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.js', |
| 69 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom-internal.h', | 63 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom-internal.h', |
| 70 ], | 64 ], |
| 71 'action': [ | 65 'action': [ |
| 72 'python', '<@(mojom_bindings_generator)', | 66 'python', '<@(mojom_bindings_generator)', |
| 73 './<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom', | 67 './<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom', |
| 74 '--use_chromium_bundled_pylibs', | 68 '--use_chromium_bundled_pylibs', |
| 75 '-d', '<(DEPTH)', | 69 '-d', '<(DEPTH)', |
| 76 '-o', '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_
DIRNAME)', | 70 '-o', '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_
DIRNAME)', |
| 77 '--java_output_directory=<(java_out_dir)', | |
| 78 ], | 71 ], |
| 79 'message': 'Generating Mojo bindings from <(RULE_INPUT_DIRNAME)/<(RULE_INP
UT_ROOT).mojom', | 72 'message': 'Generating Mojo bindings from <(RULE_INPUT_DIRNAME)/<(RULE_INP
UT_ROOT).mojom', |
| 80 'process_outputs_as_sources': 1, | 73 'process_outputs_as_sources': 1, |
| 81 } | 74 } |
| 82 ], | 75 ], |
| 83 'include_dirs': [ | 76 'include_dirs': [ |
| 84 '<(DEPTH)', | 77 '<(DEPTH)', |
| 85 '<(SHARED_INTERMEDIATE_DIR)', | 78 '<(SHARED_INTERMEDIATE_DIR)', |
| 86 ], | 79 ], |
| 87 'direct_dependent_settings': { | 80 'direct_dependent_settings': { |
| 88 'include_dirs': [ | 81 'include_dirs': [ |
| 89 '<(DEPTH)', | 82 '<(DEPTH)', |
| 90 '<(SHARED_INTERMEDIATE_DIR)', | 83 '<(SHARED_INTERMEDIATE_DIR)', |
| 91 ], | 84 ], |
| 92 'variables': { | |
| 93 'generated_src_dirs': [ | |
| 94 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | |
| 95 ], | |
| 96 }, | |
| 97 }, | 85 }, |
| 98 'hard_dependency': 1, | 86 'hard_dependency': 1, |
| 99 } | 87 } |
| OLD | NEW |