| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 mojom_generator_root = "//mojo/public/tools/bindings" | 5 mojom_generator_root = "//mojo/public/tools/bindings" |
| 6 mojom_generator_script = "$mojom_generator_root/mojom_bindings_generator.py" | 6 mojom_generator_script = "$mojom_generator_root/mojom_bindings_generator.py" |
| 7 mojom_generator_sources = [ | 7 mojom_generator_sources = [ |
| 8 "$mojom_generator_root/generators/mojom_cpp_generator.py", | 8 "$mojom_generator_root/generators/mojom_cpp_generator.py", |
| 9 "$mojom_generator_root/generators/mojom_js_generator.py", | 9 "$mojom_generator_root/generators/mojom_js_generator.py", |
| 10 "$mojom_generator_root/generators/mojom_java_generator.py", | 10 "$mojom_generator_root/generators/mojom_java_generator.py", |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 foreach(configuration, _bindings_configurations) { | 40 foreach(configuration, _bindings_configurations) { |
| 41 # Check that the mojom field of each typemap refers to a mojom that exists. | 41 # Check that the mojom field of each typemap refers to a mojom that exists. |
| 42 foreach(typemap, configuration.typemaps) { | 42 foreach(typemap, configuration.typemaps) { |
| 43 read_file(typemap.mojom, "") | 43 read_file(typemap.mojom, "") |
| 44 } | 44 } |
| 45 if (is_mac && defined(configuration.typemaps_mac)) { | 45 if (is_mac && defined(configuration.typemaps_mac)) { |
| 46 foreach(typemap, configuration.typemaps_mac) { | 46 foreach(typemap, configuration.typemaps_mac) { |
| 47 read_file(typemap.mojom, "") | 47 read_file(typemap.mojom, "") |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 if (is_win && defined(configuration.typemaps_win)) { |
| 51 foreach(typemap, configuration.typemaps_win) { |
| 52 read_file(typemap.mojom, "") |
| 53 } |
| 54 } |
| 50 } | 55 } |
| 51 | 56 |
| 52 # Generates targets for building C++, JavaScript and Java bindings from mojom | 57 # Generates targets for building C++, JavaScript and Java bindings from mojom |
| 53 # files. The output files will go under the generated file directory tree with | 58 # files. The output files will go under the generated file directory tree with |
| 54 # the same path as each input file. | 59 # the same path as each input file. |
| 55 # | 60 # |
| 56 # Other targets should depend on one of these generated targets (where "foo" | 61 # Other targets should depend on one of these generated targets (where "foo" |
| 57 # is the target name): | 62 # is the target name): |
| 58 # | 63 # |
| 59 # foo | 64 # foo |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 active_typemaps += [ typemap ] | 294 active_typemaps += [ typemap ] |
| 290 } | 295 } |
| 291 } | 296 } |
| 292 if (is_mac && defined(bindings_configuration.typemaps_mac)) { | 297 if (is_mac && defined(bindings_configuration.typemaps_mac)) { |
| 293 foreach(typemap, bindings_configuration.typemaps_mac) { | 298 foreach(typemap, bindings_configuration.typemaps_mac) { |
| 294 if (get_path_info(source, "abspath") == typemap.mojom) { | 299 if (get_path_info(source, "abspath") == typemap.mojom) { |
| 295 active_typemaps += [ typemap ] | 300 active_typemaps += [ typemap ] |
| 296 } | 301 } |
| 297 } | 302 } |
| 298 } | 303 } |
| 304 if (is_win && defined(bindings_configuration.typemaps_win)) { |
| 305 foreach(typemap, bindings_configuration.typemaps_win) { |
| 306 if (get_path_info(source, "abspath") == typemap.mojom) { |
| 307 active_typemaps += [ typemap ] |
| 308 } |
| 309 } |
| 310 } |
| 299 } | 311 } |
| 300 | 312 |
| 301 if (!cpp_only) { | 313 if (!cpp_only) { |
| 302 generator_js_outputs = | 314 generator_js_outputs = |
| 303 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.js" ] | 315 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.js" ] |
| 304 generator_java_outputs = | 316 generator_java_outputs = |
| 305 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.srcjar" ] | 317 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.srcjar" ] |
| 306 } | 318 } |
| 307 generator_target_name = "${target_name}${variant_suffix}__generator" | 319 generator_target_name = "${target_name}${variant_suffix}__generator" |
| 308 action_foreach(generator_target_name) { | 320 action_foreach(generator_target_name) { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 full_name = get_label_info(d, "label_no_toolchain") | 580 full_name = get_label_info(d, "label_no_toolchain") |
| 569 deps += [ "${full_name}_java" ] | 581 deps += [ "${full_name}_java" ] |
| 570 } | 582 } |
| 571 | 583 |
| 572 srcjar_deps = [ ":$java_srcjar_target_name" ] | 584 srcjar_deps = [ ":$java_srcjar_target_name" ] |
| 573 run_findbugs_override = false | 585 run_findbugs_override = false |
| 574 } | 586 } |
| 575 } | 587 } |
| 576 } | 588 } |
| 577 } | 589 } |
| OLD | NEW |