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
3 # found in the LICENSE file.
7 'mojom_bindings_generator_variables.gypi',
10 'mojom_base_output_dir':
11 '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))',
12 'mojom_generated_outputs': [
13 '<!@(python <(DEPTH)/mojo/public/tools/bindings/mojom_list_outputs.py --basedir <(mojom_base_output_dir) <@(mojom_files))',
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.
22 'action_name': '<(_target_name)_mojom_bindings_generator',
24 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',
25 'mojom_import_args%': [
30 '<@(mojom_bindings_generator_sources)',
34 '<@(mojom_generated_outputs)',
37 'python', '<@(mojom_bindings_generator)',
39 '--use_bundled_pylibs',
41 '<@(mojom_import_args)',
42 '-o', '<(SHARED_INTERMEDIATE_DIR)',
43 '--java_output_directory=<(java_out_dir)',
45 'message': 'Generating Mojo bindings from <@(mojom_files)',
48 # Prevent the generated sources from being injected into the "all" target by
49 # preventing the code generator from being directly depended on by the "all"
51 'suppress_wildcard': '1',
52 'direct_dependent_settings': {
53 # A target directly depending on this action will compile the generated
56 '<@(mojom_generated_outputs)',
58 # Include paths needed to compile the generated sources into a library.
61 '<(SHARED_INTERMEDIATE_DIR)',
63 # Make sure the generated header files are available for any static library
64 # that depends on a static library that depends on this generator.
66 'direct_dependent_settings': {
67 # Include paths needed to find the generated header files and their
68 # transitive dependancies when using the library.
71 '<(SHARED_INTERMEDIATE_DIR)',
74 'generated_src_dirs': [
75 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',