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': { |
| 10 'variables': { |
| 11 'mojom_variant%': 'none', |
| 12 }, |
| 13 'mojom_variant%': '<(mojom_variant)', |
| 14 'mojom_base_output_dir': |
| 15 '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))', |
| 16 'mojom_generated_outputs': [ |
| 17 '<!@(python <(DEPTH)/mojo/public/tools/bindings/mojom_list_outputs.py --ba
sedir <(mojom_base_output_dir) --variant <(mojom_variant) <@(_sources))', |
| 18 ], |
| 19 'mojom_extra_generator_args%': [], |
| 20 'conditions': [ |
| 21 ['mojom_variant=="none"', { |
| 22 'mojom_output_languages%': 'c++,javascript,java', |
| 23 }, { |
| 24 'mojom_output_languages%': 'c++', |
| 25 }], |
| 26 ], |
| 27 }, |
9 'actions': [ | 28 'actions': [ |
10 { | 29 { |
11 'variables': { | 30 'variables': { |
12 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 31 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
13 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', | 32 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', |
14 }, | 33 }, |
15 'action_name': '<(_target_name)_mojom_bindings_stamp', | 34 'action_name': '<(_target_name)_mojom_bindings_stamp', |
16 # The java output directory is deleted to ensure that the java library | 35 # The java output directory is deleted to ensure that the java library |
17 # doesn't try to compile stale files. | 36 # doesn't try to compile stale files. |
18 'action': [ | 37 'action': [ |
19 'python', '<(DEPTH)/build/rmdir_and_stamp.py', | 38 'python', '<(DEPTH)/build/rmdir_and_stamp.py', |
20 '<(java_out_dir)', | 39 '<(java_out_dir)', |
21 '<(stamp_filename)', | 40 '<(stamp_filename)', |
22 ], | 41 ], |
23 'inputs': [ '<@(_sources)' ], | 42 'inputs': [ '<@(_sources)' ], |
24 'outputs': [ '<(stamp_filename)' ], | 43 'outputs': [ '<(stamp_filename)' ], |
25 } | 44 } |
26 ], | 45 ], |
27 'rules': [ | 46 'rules': [ |
28 { | 47 { |
29 'rule_name': '<(_target_name)_mojom_bindings_generator', | 48 'rule_name': '<(_target_name)_mojom_bindings_generator', |
30 'extension': 'mojom', | 49 'extension': 'mojom', |
31 'variables': { | 50 'variables': { |
32 'mojom_base_output_dir': | |
33 '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))', | |
34 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 51 'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
35 'mojom_import_args%': [ | 52 'mojom_import_args%': [ |
36 '-I<(DEPTH)', | 53 '-I<(DEPTH)', |
37 ], | 54 ], |
38 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', | 55 'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_na
me).stamp', |
39 }, | 56 }, |
40 'inputs': [ | 57 'inputs': [ |
41 '<@(mojom_bindings_generator_sources)', | 58 '<@(mojom_bindings_generator_sources)', |
42 '<(stamp_filename)', | 59 '<(stamp_filename)', |
43 ], | 60 ], |
44 'outputs': [ | 61 'conditions': [ |
45 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.cc', | 62 ['mojom_variant=="none"', { |
46 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.h', | 63 'outputs': [ |
47 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom.js', | 64 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DI
RNAME)/<(RULE_INPUT_ROOT).mojom.cc', |
48 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAM
E)/<(RULE_INPUT_ROOT).mojom-internal.h', | 65 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DI
RNAME)/<(RULE_INPUT_ROOT).mojom.h', |
| 66 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DI
RNAME)/<(RULE_INPUT_ROOT).mojom.js', |
| 67 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DI
RNAME)/<(RULE_INPUT_ROOT).mojom-internal.h', |
| 68 ] |
| 69 }, { |
| 70 'outputs': [ |
| 71 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DI
RNAME)/<(RULE_INPUT_ROOT).mojom-<(mojom_variant).cc', |
| 72 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DI
RNAME)/<(RULE_INPUT_ROOT).mojom-<(mojom_variant).h', |
| 73 '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DI
RNAME)/<(RULE_INPUT_ROOT).mojom-<(mojom_variant)-internal.h', |
| 74 ], |
| 75 }] |
49 ], | 76 ], |
50 'action': [ | 77 'action': [ |
51 'python', '<@(mojom_bindings_generator)', | 78 'python', '<@(mojom_bindings_generator)', |
52 './<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom', | 79 './<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom', |
53 '--use_bundled_pylibs', | 80 '--use_bundled_pylibs', |
54 '-d', '<(DEPTH)', | 81 '-d', '<(DEPTH)', |
55 '<@(mojom_import_args)', | 82 '<@(mojom_import_args)', |
56 '-o', '<(SHARED_INTERMEDIATE_DIR)', | 83 '-o', '<(SHARED_INTERMEDIATE_DIR)', |
57 '--java_output_directory=<(java_out_dir)', | 84 '--java_output_directory=<(java_out_dir)', |
| 85 '--variant', '<(mojom_variant)', |
| 86 '-g', '<(mojom_output_languages)', |
| 87 '<@(mojom_extra_generator_args)', |
58 ], | 88 ], |
59 'message': 'Generating Mojo bindings from <(RULE_INPUT_DIRNAME)/<(RULE_INP
UT_ROOT).mojom', | 89 'message': 'Generating Mojo bindings from <(RULE_INPUT_DIRNAME)/<(RULE_INP
UT_ROOT).mojom', |
60 'process_outputs_as_sources': 1, | 90 'process_outputs_as_sources': 1, |
61 } | 91 } |
62 ], | 92 ], |
63 'dependencies': [ | 93 'dependencies': [ |
64 '<(DEPTH)/base/base.gyp:base', | 94 '<(DEPTH)/base/base.gyp:base', |
65 '<(DEPTH)/third_party/mojo/mojo_public.gyp:mojo_interface_bindings_generatio
n', | 95 '<(DEPTH)/third_party/mojo/mojo_public.gyp:mojo_interface_bindings_generatio
n', |
66 ], | 96 ], |
67 'include_dirs': [ | 97 'include_dirs': [ |
(...skipping 10 matching lines...) Expand all Loading... |
78 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', | 108 '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src', |
79 ], | 109 ], |
80 'additional_input_paths': [ | 110 'additional_input_paths': [ |
81 '<@(mojom_bindings_generator_sources)', | 111 '<@(mojom_bindings_generator_sources)', |
82 '<@(_sources)', | 112 '<@(_sources)', |
83 ], | 113 ], |
84 }, | 114 }, |
85 }, | 115 }, |
86 'hard_dependency': 1, | 116 'hard_dependency': 1, |
87 } | 117 } |
OLD | NEW |