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 import("../utils/create_timestamp.gni") |
| 6 |
| 7 template("make_third_party_pkg_files_stamp") { |
| 8 assert(defined(invoker.pattern), "Must define the file pattern") |
| 9 assert(defined(invoker.id), "Must define the stamp file id") |
| 10 path = rebase_path("../third_party/pkg") |
| 11 if (defined(invoker.path)) { |
| 12 path = invoker.path |
| 13 } |
| 14 id = invoker.id |
| 15 create_timestamp_file(target_name) { |
| 16 pattern = invoker.pattern |
| 17 path = path |
| 18 new_base = "//" |
| 19 output = "$target_gen_dir/third_party_pkg_files_$id.stamp" |
| 20 } |
| 21 } |
| 22 |
| 23 make_third_party_pkg_files_stamp("make_third_party_pkg_files_0_stamp") { |
| 24 pattern = "^(?!.*/test/).*(?<!_test)[.]dart\$" |
| 25 path = rebase_path(".") |
| 26 id = "0" |
| 27 } |
| 28 |
| 29 make_third_party_pkg_files_stamp("make_third_party_pkg_files_1_stamp") { |
| 30 pattern = "^(?!.*_test\.dart).*[a-k]\.dart\$" |
| 31 id = "1" |
| 32 } |
| 33 |
| 34 make_third_party_pkg_files_stamp("make_third_party_pkg_files_2_stamp") { |
| 35 pattern = "^(?!.*_test\.dart).*[l-r]\.dart\$" |
| 36 id = "2" |
| 37 } |
| 38 |
| 39 make_third_party_pkg_files_stamp("make_third_party_pkg_files_3_stamp") { |
| 40 pattern = "^(?!.*_test\.dart).*[^a-r]\.dart\$" |
| 41 id = "3" |
| 42 } |
| 43 |
| 44 action("pkg_files_stamp") { |
| 45 deps = [ |
| 46 ":make_third_party_pkg_files_0_stamp", |
| 47 ":make_third_party_pkg_files_1_stamp", |
| 48 ":make_third_party_pkg_files_2_stamp", |
| 49 ":make_third_party_pkg_files_3_stamp", |
| 50 ] |
| 51 |
| 52 stamp0_outputs = get_target_outputs(":make_third_party_pkg_files_0_stamp") |
| 53 stamp1_outputs = get_target_outputs(":make_third_party_pkg_files_1_stamp") |
| 54 stamp2_outputs = get_target_outputs(":make_third_party_pkg_files_2_stamp") |
| 55 stamp3_outputs = get_target_outputs(":make_third_party_pkg_files_3_stamp") |
| 56 |
| 57 inputs = ["../tools/list_files.py"] + |
| 58 stamp0_outputs + |
| 59 stamp1_outputs + |
| 60 stamp2_outputs + |
| 61 stamp3_outputs |
| 62 |
| 63 outputs = [ |
| 64 "$root_gen_dir/pkg_files.stamp" |
| 65 ] |
| 66 |
| 67 script = "../tools/create_timestamp_file.py" |
| 68 args = [ |
| 69 rebase_path("$root_gen_dir/pkg_files.stamp"), |
| 70 ] |
| 71 } |
OLD | NEW |