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 }, | 15 }, |
16 # Given mojom files as inputs, generate sources. These sources will be | 16 # Given mojom files as inputs, generate sources. These sources will be |
17 # exported to another target (via dependent_settings) to be compiled. This | 17 # exported to another target (via dependent_settings) to be compiled. This |
18 # keeps code generation separate from compilation, allowing the same sources | 18 # keeps code generation separate from compilation, allowing the same sources |
19 # to be compiled with multiple toolchains - target, NaCl, etc. | 19 # to be compiled with multiple toolchains - target, NaCl, etc. |
20 'actions': [ | 20 'actions': [ |
21 { | 21 { |
| 22 'variables': { |
| 23 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
| 24 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', |
| 25 }, |
| 26 'action_name': '<(_target_name)_mojom_bindings_stamp', |
| 27 # The java output directory is deleted to ensure that the java library |
| 28 # doesn't try to compile stale files. |
| 29 'action': [ |
| 30 'python', '<(DEPTH)/build/rmdir_and_stamp.py', |
| 31 '<(java_out_dir)', |
| 32 '<(stamp_filename)', |
| 33 ], |
| 34 'inputs': [ '<@(mojom_files)' ], |
| 35 'outputs': [ '<(stamp_filename)' ], |
| 36 }, |
| 37 { |
22 'action_name': '<(_target_name)_mojom_bindings_generator', | 38 'action_name': '<(_target_name)_mojom_bindings_generator', |
23 'variables': { | 39 'variables': { |
24 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 40 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
| 41 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', |
25 'mojom_import_args%': [ | 42 'mojom_import_args%': [ |
26 '-I<(DEPTH)', | 43 '-I<(DEPTH)', |
27 '-I<(DEPTH)/third_party/mojo/src' | 44 '-I<(DEPTH)/third_party/mojo/src' |
28 ], | 45 ], |
29 }, | 46 }, |
30 'inputs': [ | 47 'inputs': [ |
31 '<@(mojom_bindings_generator_sources)', | 48 '<@(mojom_bindings_generator_sources)', |
32 '<@(mojom_files)', | 49 '<@(mojom_files)', |
| 50 '<(stamp_filename)', |
33 ], | 51 ], |
34 'outputs': [ | 52 'outputs': [ |
35 '<@(mojom_generated_outputs)', | 53 '<@(mojom_generated_outputs)', |
36 ], | 54 ], |
37 'action': [ | 55 'action': [ |
38 'python', '<@(mojom_bindings_generator)', | 56 'python', '<@(mojom_bindings_generator)', |
39 '<@(mojom_files)', | 57 '<@(mojom_files)', |
40 '--use_bundled_pylibs', | 58 '--use_bundled_pylibs', |
41 '-d', '<(DEPTH)', | 59 '-d', '<(DEPTH)', |
42 '<@(mojom_import_args)', | 60 '<@(mojom_import_args)', |
(...skipping 29 matching lines...) Expand all Loading... |
72 'include_dirs': [ | 90 'include_dirs': [ |
73 '<(DEPTH)', | 91 '<(DEPTH)', |
74 '<(DEPTH)/third_party/mojo/src', | 92 '<(DEPTH)/third_party/mojo/src', |
75 '<(SHARED_INTERMEDIATE_DIR)', | 93 '<(SHARED_INTERMEDIATE_DIR)', |
76 '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src', | 94 '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src', |
77 ], | 95 ], |
78 'variables': { | 96 'variables': { |
79 'generated_src_dirs': [ | 97 'generated_src_dirs': [ |
80 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 98 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
81 ], | 99 ], |
| 100 'additional_input_paths': [ |
| 101 '<@(mojom_bindings_generator_sources)', |
| 102 '<@(mojom_files)', |
| 103 ], |
82 }, | 104 }, |
83 } | 105 } |
84 }, | 106 }, |
85 } | 107 } |
OLD | NEW |