| 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)/mojo/public/tools/bindings/mojom_list_outputs.py --ba
sedir <(mojom_base_output_dir) <@(mojom_files))', | 13 '<!@(python <(DEPTH)/mojo/public/tools/bindings/mojom_list_outputs.py --ba
sedir <(mojom_base_output_dir) <@(mojom_files))', |
| 14 ], | 14 ], |
| 15 }, | 15 }, |
| 16 # Given mojom files as inputs, generate sources. These sources will be |
| 17 # exported to another target (via dependent_settings) to be compiled. This |
| 18 # keeps code generation separate from compilation, allowing the same sources |
| 19 # to be compiled with multiple toolchains - target, NaCl, etc. |
| 16 'actions': [ | 20 'actions': [ |
| 17 { | 21 { |
| 18 'action_name': '<(_target_name)_mojom_bindings_generator', | 22 'action_name': '<(_target_name)_mojom_bindings_generator', |
| 19 'variables': { | 23 'variables': { |
| 20 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 24 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
| 21 'mojom_import_args%': [ | 25 'mojom_import_args%': [ |
| 22 '-I<(DEPTH)' | 26 '-I<(DEPTH)' |
| 23 ], | 27 ], |
| 24 }, | 28 }, |
| 25 'inputs': [ | 29 'inputs': [ |
| 26 '<@(mojom_bindings_generator_sources)', | 30 '<@(mojom_bindings_generator_sources)', |
| 27 '<@(mojom_files)', | 31 '<@(mojom_files)', |
| 28 ], | 32 ], |
| 29 'outputs': [ | 33 'outputs': [ |
| 30 '<@(mojom_generated_outputs)', | 34 '<@(mojom_generated_outputs)', |
| 31 ], | 35 ], |
| 32 'action': [ | 36 'action': [ |
| 33 'python', '<@(mojom_bindings_generator)', | 37 'python', '<@(mojom_bindings_generator)', |
| 34 '<@(mojom_files)', | 38 '<@(mojom_files)', |
| 35 '--use_chromium_bundled_pylibs', | 39 '--use_chromium_bundled_pylibs', |
| 36 '-d', '<(DEPTH)', | 40 '-d', '<(DEPTH)', |
| 37 '<@(mojom_import_args)', | 41 '<@(mojom_import_args)', |
| 38 '-o', '<(SHARED_INTERMEDIATE_DIR)', | 42 '-o', '<(SHARED_INTERMEDIATE_DIR)', |
| 39 '--java_output_directory=<(java_out_dir)', | 43 '--java_output_directory=<(java_out_dir)', |
| 40 ], | 44 ], |
| 41 'message': 'Generating Mojo bindings from <@(mojom_files)', | 45 'message': 'Generating Mojo bindings from <@(mojom_files)', |
| 42 'process_outputs_as_sources': 1, | |
| 43 } | 46 } |
| 44 ], | 47 ], |
| 45 'direct_dependent_settings': { | 48 'direct_dependent_settings': { |
| 49 # A target directly depending on this action will compile the generated |
| 50 # sources. |
| 46 'sources': [ | 51 'sources': [ |
| 47 '<@(mojom_generated_outputs)', | 52 '<@(mojom_generated_outputs)', |
| 48 ], | 53 ], |
| 49 # Include paths needed to compile the generated sources into a library. | 54 # Include paths needed to compile the generated sources into a library. |
| 50 'include_dirs': [ | 55 'include_dirs': [ |
| 51 '<(DEPTH)', | 56 '<(DEPTH)', |
| 52 '<(SHARED_INTERMEDIATE_DIR)', | 57 '<(SHARED_INTERMEDIATE_DIR)', |
| 53 ], | 58 ], |
| 59 # Make sure the generated header files are available for any static library |
| 60 # that depends on a static library that depends on this generator. |
| 61 'hard_dependency': 1, |
| 54 'direct_dependent_settings': { | 62 'direct_dependent_settings': { |
| 55 # Include paths needed to find the generated header files and their | 63 # Include paths needed to find the generated header files and their |
| 56 # transitive dependancies when using the library. | 64 # transitive dependancies when using the library. |
| 57 'include_dirs': [ | 65 'include_dirs': [ |
| 58 '<(DEPTH)', | 66 '<(DEPTH)', |
| 59 '<(SHARED_INTERMEDIATE_DIR)', | 67 '<(SHARED_INTERMEDIATE_DIR)', |
| 60 ], | 68 ], |
| 61 'variables': { | 69 'variables': { |
| 62 » 'generated_src_dirs': [ | 70 'generated_src_dirs': [ |
| 63 » '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 71 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
| 64 » ], | 72 ], |
| 65 }, | 73 }, |
| 66 } | 74 } |
| 67 }, | 75 }, |
| 68 'hard_dependency': 1, | |
| 69 } | 76 } |
| OLD | NEW |