Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: build/copy_tree.gni

Issue 2848943003: [infra] Assembles the SDK using GN rather than create_sdk.py (Closed)
Patch Set: Fix for Windows Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file.
4
5 _dart_root = rebase_path("..")
6
7 template("copy_tree") {
8 assert(defined(invoker.source), "copy_tree must define 'source'")
9 assert(defined(invoker.dest), "copy_tree must define 'dest'")
10 source = invoker.source
11 dest = invoker.dest
12 action(target_name) {
13 if (defined(invoker.visibility)) {
14 visibility = invoker.visibility
15 }
16
17 deps = []
18 if (defined(invoker.deps)) {
19 deps += invoker.deps
20 }
21
22 common_args = [
23 "--from",
24 rebase_path(source),
25 "--to",
26 rebase_path(dest),
27 ]
28 if (defined(invoker.exclude)) {
29 common_args += [
30 "--exclude",
31 invoker.exclude,
32 ]
33 }
34
35 dry_run_args = common_args + [ "--dry-run" ]
36 input_files =
37 exec_script("$_dart_root/tools/copy_tree.py", dry_run_args, "list lines" )
38 inputs = input_files
39 relative_files = rebase_path(input_files, rebase_path(source))
40
41 output_files = []
42 foreach(input, relative_files) {
43 output_files += [ "$dest/$input" ]
44 }
45
46 outputs = output_files
47 script = "$_dart_root/tools/copy_tree.py"
48 args = common_args
49 }
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698