| 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 28 matching lines...) Expand all Loading... |
| 39 # | 39 # |
| 40 # DEPRECATED: This is synonymous with public_deps because all mojom | 40 # DEPRECATED: This is synonymous with public_deps because all mojom |
| 41 # dependencies must be public by design. Please use public_deps. | 41 # dependencies must be public by design. Please use public_deps. |
| 42 # | 42 # |
| 43 # public_deps (optional) | 43 # public_deps (optional) |
| 44 # Note: this can contain only other mojom targets. | 44 # Note: this can contain only other mojom targets. |
| 45 # | 45 # |
| 46 # import_dirs (optional) | 46 # import_dirs (optional) |
| 47 # List of import directories that will get added when processing sources. | 47 # List of import directories that will get added when processing sources. |
| 48 # | 48 # |
| 49 # with_environment (optional) | |
| 50 # Set to |false| to omit an implicit bindings dependency on the Chromium | |
| 51 # Mojo environment implementation. Defaults to |true| and in general | |
| 52 # should only be overridden by mojom targets within the Mojo EDK. | |
| 53 # | |
| 54 # typemaps (optional) | 49 # typemaps (optional) |
| 55 # A list of typemap files to apply during bindings generation. | 50 # A list of typemap files to apply during bindings generation. |
| 56 # | 51 # |
| 57 # typemap_deps (optional) | 52 # typemap_deps (optional) |
| 58 # A list of public dependencies needed to support active typemaps. | 53 # A list of public dependencies needed to support active typemaps. |
| 59 # | 54 # |
| 60 # variant (optional) | 55 # variant (optional) |
| 61 # A variant name to apply to generated bindings. Variant influences | 56 # A variant name to apply to generated bindings. Variant influences |
| 62 # generated source filenames as wells the symbols they define. | 57 # generated source filenames as wells the symbols they define. |
| 63 # | 58 # |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 if (defined(invoker.typemap_deps)) { | 238 if (defined(invoker.typemap_deps)) { |
| 244 public_deps += invoker.typemap_deps | 239 public_deps += invoker.typemap_deps |
| 245 } | 240 } |
| 246 foreach(d, all_deps) { | 241 foreach(d, all_deps) { |
| 247 # Resolve the name, so that a target //mojo/something becomes | 242 # Resolve the name, so that a target //mojo/something becomes |
| 248 # //mojo/something:something and we can append cpp_sources_suffix to | 243 # //mojo/something:something and we can append cpp_sources_suffix to |
| 249 # get the cpp dependency name. | 244 # get the cpp dependency name. |
| 250 full_name = get_label_info(d, "label_no_toolchain") | 245 full_name = get_label_info(d, "label_no_toolchain") |
| 251 deps += [ "${full_name}_${cpp_sources_suffix}" ] | 246 deps += [ "${full_name}_${cpp_sources_suffix}" ] |
| 252 } | 247 } |
| 253 if (!defined(invoker.with_environment) || invoker.with_environment) { | |
| 254 deps += [ "//mojo/environment:chromium" ] | |
| 255 } | |
| 256 } | 248 } |
| 257 } | 249 } |
| 258 | 250 |
| 259 if (is_android && !defined(invoker.variant)) { | 251 if (is_android && !defined(invoker.variant)) { |
| 260 import("//build/config/android/rules.gni") | 252 import("//build/config/android/rules.gni") |
| 261 | 253 |
| 262 java_srcjar_target_name = target_name + "_java_sources" | 254 java_srcjar_target_name = target_name + "_java_sources" |
| 263 action(java_srcjar_target_name) { | 255 action(java_srcjar_target_name) { |
| 264 script = "//mojo/public/tools/gn/zip.py" | 256 script = "//mojo/public/tools/gn/zip.py" |
| 265 inputs = process_file_template(invoker.sources, generator_java_outputs) | 257 inputs = process_file_template(invoker.sources, generator_java_outputs) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 291 # //mojo/something:something and we can append "_java" to get the java | 283 # //mojo/something:something and we can append "_java" to get the java |
| 292 # dependency name. | 284 # dependency name. |
| 293 full_name = get_label_info(d, "label_no_toolchain") | 285 full_name = get_label_info(d, "label_no_toolchain") |
| 294 deps += [ "${full_name}_java" ] | 286 deps += [ "${full_name}_java" ] |
| 295 } | 287 } |
| 296 | 288 |
| 297 srcjar_deps = [ ":$java_srcjar_target_name" ] | 289 srcjar_deps = [ ":$java_srcjar_target_name" ] |
| 298 } | 290 } |
| 299 } | 291 } |
| 300 } | 292 } |
| OLD | NEW |