Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright (c) 2016, 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 template("make_third_party_pkg_files_stamp") { | |
|
Cutch
2016/09/29 16:41:26
Could this be factored into a template that is sha
zra
2016/09/29 17:46:41
Done.
| |
| 6 assert(defined(invoker.pattern), "Must define the file pattern") | |
| 7 assert(defined(invoker.id), "Must define the stamp file id") | |
| 8 pattern = invoker.pattern | |
| 9 id = invoker.id | |
| 10 action(target_name) { | |
| 11 files = exec_script("../tools/list_files.py", | |
| 12 [pattern, rebase_path("../third_party/pkg")], | |
| 13 "list lines") | |
| 14 inputs = [ "../tools/list_files.py" ] + | |
| 15 rebase_path(files, "//", ".") | |
| 16 | |
| 17 outputs = [ | |
| 18 "$target_gen_dir/third_party_pkg_files_$id.stamp" | |
| 19 ] | |
| 20 | |
| 21 script = "../tools/create_timestamp_file.py" | |
| 22 args = [ | |
| 23 rebase_path("$target_gen_dir/third_party_pkg_files_$id.stamp"), | |
| 24 ] | |
| 25 } | |
| 26 } | |
| 27 | |
| 28 make_third_party_pkg_files_stamp("make_third_party_pkg_files_1_stamp") { | |
| 29 pattern = "^(?!.*_test\.dart).*[a-k]\.dart\$" | |
| 30 id = "1" | |
| 31 } | |
| 32 | |
| 33 make_third_party_pkg_files_stamp("make_third_party_pkg_files_2_stamp") { | |
| 34 pattern = "^(?!.*_test\.dart).*[l-r]\.dart\$" | |
| 35 id = "2" | |
| 36 } | |
| 37 | |
| 38 make_third_party_pkg_files_stamp("make_third_party_pkg_files_3_stamp") { | |
| 39 pattern = "^(?!.*_test\.dart).*[^a-r]\.dart\$" | |
| 40 id = "3" | |
| 41 } | |
| 42 | |
| 43 action("pkg_files_stamp") { | |
| 44 deps = [ | |
| 45 ":make_third_party_pkg_files_1_stamp", | |
| 46 ":make_third_party_pkg_files_2_stamp", | |
| 47 ":make_third_party_pkg_files_3_stamp", | |
| 48 ] | |
| 49 | |
| 50 files = exec_script("../tools/list_files.py", | |
| 51 ["^(?!.*/test/).*(?<!_test)[.]dart\$", | |
| 52 rebase_path(".")], | |
| 53 "list lines") | |
| 54 | |
| 55 stamp1_outputs = get_target_outputs(":make_third_party_pkg_files_1_stamp") | |
| 56 stamp2_outputs = get_target_outputs(":make_third_party_pkg_files_2_stamp") | |
| 57 stamp3_outputs = get_target_outputs(":make_third_party_pkg_files_3_stamp") | |
| 58 | |
| 59 inputs = ["../tools/list_files.py"] + | |
| 60 rebase_path(files, "//", ".") + | |
| 61 stamp1_outputs + | |
| 62 stamp2_outputs + | |
| 63 stamp3_outputs | |
| 64 | |
| 65 outputs = [ | |
| 66 "$root_gen_dir/pkg_files.stamp" | |
| 67 ] | |
| 68 | |
| 69 script = "../tools/create_timestamp_file.py" | |
| 70 args = [ | |
| 71 rebase_path("$root_gen_dir/pkg_files.stamp"), | |
| 72 ] | |
| 73 } | |
| OLD | NEW |