OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 template("make_file_arrays") { |
| 6 assert(defined(invoker.resources), "Need resources in %target_name") |
| 7 assert(defined(invoker.filename), "Need filename in %target_name") |
| 8 |
| 9 code_gen_target_name = target_name + "_code_gen" |
| 10 |
| 11 action(code_gen_target_name) { |
| 12 source_prereqs = invoker.resources |
| 13 script = "//third_party/WebKit/Source/build/scripts/make-file-arrays.py" |
| 14 sources = [ script ] |
| 15 sources += invoker.resources |
| 16 outputs = [ |
| 17 "$root_gen_dir/blink/" + invoker.filename + ".h", |
| 18 "$root_gen_dir/blink/" + invoker.filename + ".cpp", |
| 19 ] |
| 20 args = [ |
| 21 "--out-h=gen/blink/" + invoker.filename + ".h", |
| 22 "--out-cpp=gen/blink/" + invoker.filename + ".cpp", |
| 23 ] |
| 24 args += rebase_path(invoker.resources, root_build_dir, ".") |
| 25 } |
| 26 |
| 27 source_set(target_name) { |
| 28 sources = get_target_outputs(":$code_gen_target_name") |
| 29 deps = [ ":$code_gen_target_name" ] |
| 30 } |
| 31 } |
| 32 |
| 33 |
OLD | NEW |