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("run_executable") { | |
6 action("${target_name}") { | |
7 script = "//build/gn_run_binary.py" | |
8 | |
9 if (defined(invoker.sources)) { sources = invoker.sources } | |
10 if (defined(invoker.outputs)) { outputs = invoker.outputs } | |
11 if (defined(invoker.source_prereqs)) { | |
12 source_prereqs = invoker.source_prereqs | |
13 } | |
14 | |
15 args = [ | |
16 rebase_path(root_out_dir + "/" + invoker.binary_name, root_build_dir) | |
17 ] | |
18 if (defined(invoker.args)) { | |
19 args += invoker.args | |
20 } | |
21 | |
22 datadeps = [ "//build:gn_helper_scripts" ] | |
23 if (defined(invoker.datadeps)) { | |
24 datadeps += invoker.datadeps | |
25 } | |
26 if (defined(invoker.deps)) { deps = invoker.deps } | |
brettw
2014/05/05 16:46:50
Can you expand this onto multiple lines? Same abov
awong
2014/05/05 19:28:34
Done.
| |
27 } | |
28 } | |
29 | |
30 template("run_executable_foreach") { | |
31 action_foreach("${target_name}") { | |
32 script = "//build/gn_run_binary.py" | |
33 | |
34 if (defined(invoker.sources)) { sources = invoker.sources } | |
35 if (defined(invoker.outputs)) { outputs = invoker.outputs } | |
36 if (defined(invoker.source_prereqs)) { | |
37 source_prereqs = invoker.source_prereqs | |
38 } | |
39 | |
40 args = [ | |
41 rebase_path(root_out_dir + "/" + invoker.binary_name, root_build_dir) | |
42 ] | |
43 if (defined(invoker.args)) { | |
44 args += invoker.args | |
45 } | |
46 | |
47 datadeps = [ "//build:gn_helper_scripts" ] | |
48 if (defined(invoker.datadeps)) { | |
49 datadeps += invoker.datadeps | |
50 } | |
51 if (defined(invoker.deps)) { deps = invoker.deps } | |
52 } | |
53 } | |
54 | |
OLD | NEW |