| 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 import("../../mojo_sdk.gni") | 5 import("../../mojo_sdk.gni") |
| 6 | 6 |
| 7 # Generate C++ and JavaScript source files from mojom files. The output files | 7 # Generate C++ and JavaScript source files from mojom files. The output files |
| 8 # will go under the generated file directory tree with the same path as each | 8 # will go under the generated file directory tree with the same path as each |
| 9 # input file. | 9 # input file. |
| 10 # | 10 # |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 visibility = target_visibility + invoker.visibility | 173 visibility = target_visibility + invoker.visibility |
| 174 } | 174 } |
| 175 script = generator_script | 175 script = generator_script |
| 176 inputs = generator_sources | 176 inputs = generator_sources |
| 177 sources = invoker.sources | 177 sources = invoker.sources |
| 178 outputs = generator_cpp_outputs + generator_dart_outputs + | 178 outputs = generator_cpp_outputs + generator_dart_outputs + |
| 179 generator_go_outputs + generator_java_outputs + | 179 generator_go_outputs + generator_java_outputs + |
| 180 generator_js_outputs + generator_python_outputs | 180 generator_js_outputs + generator_python_outputs |
| 181 args = [ | 181 args = [ |
| 182 "{{source}}", | 182 "{{source}}", |
| 183 "--dart_mojo_root=${mojo_root}", |
| 183 "--use_bundled_pylibs", | 184 "--use_bundled_pylibs", |
| 184 "-d", | 185 "-d", |
| 185 rebase_path("//", root_build_dir), | 186 rebase_path("//", root_build_dir), |
| 186 "-I", | 187 "-I", |
| 187 rebase_path("//", root_build_dir), | 188 rebase_path("//", root_build_dir), |
| 188 "-I", | 189 "-I", |
| 189 rebase_path(mojo_root, root_build_dir), | 190 rebase_path(mojo_root, root_build_dir), |
| 190 "-o", | 191 "-o", |
| 191 rebase_path(root_gen_dir), | 192 rebase_path(root_gen_dir), |
| 192 ] | 193 ] |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 dep_target_out_dir = get_label_info(d, "target_out_dir") | 328 dep_target_out_dir = get_label_info(d, "target_out_dir") |
| 328 deps += [ "${full_name}_dart" ] | 329 deps += [ "${full_name}_dart" ] |
| 329 zip_inputs += [ "$dep_target_out_dir/$dep_name.dartzip" ] | 330 zip_inputs += [ "$dep_target_out_dir/$dep_name.dartzip" ] |
| 330 } | 331 } |
| 331 | 332 |
| 332 output = generator_dart_zip_output | 333 output = generator_dart_zip_output |
| 333 outputs = [ | 334 outputs = [ |
| 334 output, | 335 output, |
| 335 ] | 336 ] |
| 336 | 337 |
| 337 invoker_base_dir = "" | 338 invoker_import_from = "" |
| 338 if (defined(invoker.base_dir)) { | 339 if (defined(invoker.import_from)) { |
| 339 invoker_base_dir = | 340 invoker_import_from = |
| 340 rebase_path(invoker.base_dir, "$root_build_dir/../../", ".") | 341 rebase_path(invoker.import_from, "$root_build_dir/../../", ".") |
| 341 } | 342 } |
| 342 | 343 |
| 343 rebase_base_dir = | 344 rebase_import_from = |
| 344 rebase_path("$root_build_dir/gen/$invoker_base_dir", root_build_dir) | 345 rebase_path("$root_build_dir/gen/$invoker_import_from", root_build_dir) |
| 345 if (defined(invoker.sources)) { | 346 if (defined(invoker.sources)) { |
| 346 rebase_inputs = rebase_path(inputs, root_build_dir) | 347 rebase_inputs = rebase_path(inputs, root_build_dir) |
| 347 } | 348 } |
| 348 rebase_zip_inputs = rebase_path(zip_inputs, root_build_dir) | 349 rebase_zip_inputs = rebase_path(zip_inputs, root_build_dir) |
| 349 rebase_output = rebase_path(output, root_build_dir) | 350 rebase_output = rebase_path(output, root_build_dir) |
| 350 args = [ | 351 args = [ |
| 351 "--base-dir=$rebase_base_dir", | 352 "--base-dir=$rebase_import_from", |
| 352 "--zip-inputs=$rebase_zip_inputs", | 353 "--zip-inputs=$rebase_zip_inputs", |
| 353 "--output=$rebase_output", | 354 "--output=$rebase_output", |
| 354 ] | 355 ] |
| 355 if (defined(invoker.sources)) { | 356 if (defined(invoker.sources)) { |
| 356 args += [ "--inputs=$rebase_inputs" ] | 357 args += [ "--inputs=$rebase_inputs" ] |
| 357 } | 358 } |
| 358 } | 359 } |
| 359 | 360 |
| 360 if (is_android) { | 361 if (is_android) { |
| 361 import("//build/config/android/rules.gni") | 362 import("//build/config/android/rules.gni") |
| (...skipping 14 matching lines...) Expand all Loading... |
| 376 full_name = get_label_info(d, "label_no_toolchain") | 377 full_name = get_label_info(d, "label_no_toolchain") |
| 377 deps += [ "${full_name}_java" ] | 378 deps += [ "${full_name}_java" ] |
| 378 } | 379 } |
| 379 | 380 |
| 380 if (defined(invoker.sources)) { | 381 if (defined(invoker.sources)) { |
| 381 srcjars = process_file_template(invoker.sources, generator_java_outputs) | 382 srcjars = process_file_template(invoker.sources, generator_java_outputs) |
| 382 } | 383 } |
| 383 } | 384 } |
| 384 } | 385 } |
| 385 } | 386 } |
| OLD | NEW |