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("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/android/internal_rules.gni") | 6 import("//build/config/android/internal_rules.gni") |
7 import("//tools/grit/grit_rule.gni") | 7 import("//tools/grit/grit_rule.gni") |
8 | 8 |
9 assert(is_android) | 9 assert(is_android) |
10 | 10 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 # "org/chromium/FooEnum.java", | 294 # "org/chromium/FooEnum.java", |
295 # ] | 295 # ] |
296 # } | 296 # } |
297 template("java_cpp_enum") { | 297 template("java_cpp_enum") { |
298 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 298 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
299 | 299 |
300 assert(defined(invoker.sources)) | 300 assert(defined(invoker.sources)) |
301 assert(defined(invoker.outputs)) | 301 assert(defined(invoker.outputs)) |
302 | 302 |
303 action("${target_name}__generate_enum") { | 303 action("${target_name}__generate_enum") { |
304 sources = rebase_path(invoker.sources, root_build_dir) | 304 sources = invoker.sources |
305 script = "//build/android/gyp/java_cpp_enum.py" | 305 script = "//build/android/gyp/java_cpp_enum.py" |
306 gen_dir = "${target_gen_dir}/${target_name}/enums" | 306 gen_dir = "${target_gen_dir}/${target_name}/enums" |
307 outputs = get_path_info( | 307 outputs = get_path_info( |
308 rebase_path(invoker.outputs, ".", gen_dir), "abspath") | 308 rebase_path(invoker.outputs, ".", gen_dir), "abspath") |
309 | 309 |
310 args = [ | 310 args = [ |
311 "--output_dir", rebase_path(gen_dir, root_build_dir), | 311 "--output_dir", rebase_path(gen_dir, root_build_dir), |
312 ] | 312 ] |
313 foreach(output, rebase_path(outputs, root_build_dir)) { | 313 foreach(output, rebase_path(outputs, root_build_dir)) { |
314 args += ["--assert_file", output] | 314 args += ["--assert_file", output] |
315 } | 315 } |
316 args += sources | 316 args += rebase_path(invoker.sources, root_build_dir) |
317 } | 317 } |
318 | 318 |
319 generate_enum_outputs = get_target_outputs(":${target_name}__generate_enum") | 319 generate_enum_outputs = get_target_outputs(":${target_name}__generate_enum") |
320 base_gen_dir = get_label_info(":${target_name}__generate_enum", | 320 base_gen_dir = get_label_info(":${target_name}__generate_enum", |
321 "target_gen_dir") | 321 "target_gen_dir") |
322 | 322 |
323 srcjar_path = "${target_gen_dir}/${target_name}.srcjar" | 323 srcjar_path = "${target_gen_dir}/${target_name}.srcjar" |
324 zip("${target_name}__zip_srcjar") { | 324 zip("${target_name}__zip_srcjar") { |
325 inputs = generate_enum_outputs | 325 inputs = generate_enum_outputs |
326 output = srcjar_path | 326 output = srcjar_path |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 args = [ | 1084 args = [ |
1085 "--files=$rebased_binaries_list", | 1085 "--files=$rebased_binaries_list", |
1086 "--files=@FileArg($rebased_libraries_list:libraries)", | 1086 "--files=@FileArg($rebased_libraries_list:libraries)", |
1087 ] | 1087 ] |
1088 } | 1088 } |
1089 | 1089 |
1090 group(target_name) { | 1090 group(target_name) { |
1091 deps = final_deps | 1091 deps = final_deps |
1092 } | 1092 } |
1093 } | 1093 } |
OLD | NEW |