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 'includes': [ | 6 'includes': [ |
7 'mojom_bindings_generator_variables.gypi', | 7 'mojom_bindings_generator_variables.gypi', |
8 ], | 8 ], |
9 'variables': { | 9 'variables': { |
10 'mojom_base_output_dir': | 10 'mojom_base_output_dir': |
11 '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))', | 11 '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))', |
12 'mojom_generated_outputs': [ | 12 'mojom_generated_outputs': [ |
13 '<!@(python <(DEPTH)/third_party/mojo/src/mojo/public/tools/bindings/mojom
_list_outputs.py --basedir <(mojom_base_output_dir) <@(mojom_files))', | 13 '<!@(python <(DEPTH)/third_party/mojo/src/mojo/public/tools/bindings/mojom
_list_outputs.py --basedir <(mojom_base_output_dir) <@(mojom_files))', |
14 ], | 14 ], |
| 15 'require_interface_bindings%': 1, |
15 }, | 16 }, |
16 # Given mojom files as inputs, generate sources. These sources will be | 17 # Given mojom files as inputs, generate sources. These sources will be |
17 # exported to another target (via dependent_settings) to be compiled. This | 18 # exported to another target (via dependent_settings) to be compiled. This |
18 # keeps code generation separate from compilation, allowing the same sources | 19 # keeps code generation separate from compilation, allowing the same sources |
19 # to be compiled with multiple toolchains - target, NaCl, etc. | 20 # to be compiled with multiple toolchains - target, NaCl, etc. |
20 'actions': [ | 21 'actions': [ |
21 { | 22 { |
22 'variables': { | 23 'variables': { |
23 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 24 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
24 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', | 25 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 '--use_bundled_pylibs', | 59 '--use_bundled_pylibs', |
59 '-d', '<(DEPTH)', | 60 '-d', '<(DEPTH)', |
60 '<@(mojom_import_args)', | 61 '<@(mojom_import_args)', |
61 '-o', '<(SHARED_INTERMEDIATE_DIR)', | 62 '-o', '<(SHARED_INTERMEDIATE_DIR)', |
62 '--java_output_directory=<(java_out_dir)', | 63 '--java_output_directory=<(java_out_dir)', |
63 '--dart_mojo_root=//third_party/mojo/src', | 64 '--dart_mojo_root=//third_party/mojo/src', |
64 ], | 65 ], |
65 'message': 'Generating Mojo bindings from <@(mojom_files)', | 66 'message': 'Generating Mojo bindings from <@(mojom_files)', |
66 } | 67 } |
67 ], | 68 ], |
| 69 'conditions': [ |
| 70 ['require_interface_bindings==1', { |
| 71 'dependencies': [ |
| 72 '<(DEPTH)/third_party/mojo/mojo_public.gyp:mojo_interface_bindings_gener
ation', |
| 73 ], |
| 74 }], |
| 75 ], |
68 # Prevent the generated sources from being injected into the "all" target by | 76 # Prevent the generated sources from being injected into the "all" target by |
69 # preventing the code generator from being directly depended on by the "all" | 77 # preventing the code generator from being directly depended on by the "all" |
70 # target. | 78 # target. |
71 'suppress_wildcard': '1', | 79 'suppress_wildcard': '1', |
72 'direct_dependent_settings': { | 80 'direct_dependent_settings': { |
73 # A target directly depending on this action will compile the generated | 81 # A target directly depending on this action will compile the generated |
74 # sources. | 82 # sources. |
75 'sources': [ | 83 'sources': [ |
76 '<@(mojom_generated_outputs)', | 84 '<@(mojom_generated_outputs)', |
77 ], | 85 ], |
(...skipping 17 matching lines...) Expand all Loading... |
95 '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src', | 103 '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src', |
96 ], | 104 ], |
97 'variables': { | 105 'variables': { |
98 'generated_src_dirs': [ | 106 'generated_src_dirs': [ |
99 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 107 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
100 ], | 108 ], |
101 'additional_input_paths': [ | 109 'additional_input_paths': [ |
102 '<@(mojom_bindings_generator_sources)', | 110 '<@(mojom_bindings_generator_sources)', |
103 '<@(mojom_files)', | 111 '<@(mojom_files)', |
104 ], | 112 ], |
| 113 'mojom_generated_sources': [ '<@(mojom_generated_outputs)' ], |
105 }, | 114 }, |
106 } | 115 } |
107 }, | 116 }, |
108 } | 117 } |
OLD | NEW |