forked from ChromeDevTools/devtools-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy.gni
33 lines (28 loc) · 871 Bytes
/
copy.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("./node.gni")
import("./vars.gni")
template("copy_to_gen") {
node_action(target_name) {
forward_variables_from(invoker,
[
"sources",
"visibility",
"deps",
"testonly",
])
script = "scripts/build/ninja/copy-files.js"
_copy_src = rebase_path(get_path_info(target_name, "dir"))
_copy_dest = rebase_path(target_gen_dir)
args = [
_copy_src,
_copy_dest,
string_join(",", sources),
]
outputs = []
foreach(_input, sources) {
outputs += [ "$target_gen_dir/$_input" ]
}
}
}