Index: pkg/BUILD.gn |
diff --git a/pkg/BUILD.gn b/pkg/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d8efcf8aa7401302c7bec8d031e7ebce3cd1899c |
--- /dev/null |
+++ b/pkg/BUILD.gn |
@@ -0,0 +1,71 @@ |
+# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
+# for details. All rights reserved. Use of this source code is governed by a |
+# BSD-style license that can be found in the LICENSE file. |
+ |
+import("../utils/create_timestamp.gni") |
+ |
+template("make_third_party_pkg_files_stamp") { |
+ assert(defined(invoker.pattern), "Must define the file pattern") |
+ assert(defined(invoker.id), "Must define the stamp file id") |
+ path = rebase_path("../third_party/pkg") |
+ if (defined(invoker.path)) { |
+ path = invoker.path |
+ } |
+ id = invoker.id |
+ create_timestamp_file(target_name) { |
+ pattern = invoker.pattern |
+ path = path |
+ new_base = "//" |
+ output = "$target_gen_dir/third_party_pkg_files_$id.stamp" |
+ } |
+} |
+ |
+make_third_party_pkg_files_stamp("make_third_party_pkg_files_0_stamp") { |
+ pattern = "^(?!.*/test/).*(?<!_test)[.]dart\$" |
+ path = rebase_path(".") |
+ id = "0" |
+} |
+ |
+make_third_party_pkg_files_stamp("make_third_party_pkg_files_1_stamp") { |
+ pattern = "^(?!.*_test\.dart).*[a-k]\.dart\$" |
+ id = "1" |
+} |
+ |
+make_third_party_pkg_files_stamp("make_third_party_pkg_files_2_stamp") { |
+ pattern = "^(?!.*_test\.dart).*[l-r]\.dart\$" |
+ id = "2" |
+} |
+ |
+make_third_party_pkg_files_stamp("make_third_party_pkg_files_3_stamp") { |
+ pattern = "^(?!.*_test\.dart).*[^a-r]\.dart\$" |
+ id = "3" |
+} |
+ |
+action("pkg_files_stamp") { |
+ deps = [ |
+ ":make_third_party_pkg_files_0_stamp", |
+ ":make_third_party_pkg_files_1_stamp", |
+ ":make_third_party_pkg_files_2_stamp", |
+ ":make_third_party_pkg_files_3_stamp", |
+ ] |
+ |
+ stamp0_outputs = get_target_outputs(":make_third_party_pkg_files_0_stamp") |
+ stamp1_outputs = get_target_outputs(":make_third_party_pkg_files_1_stamp") |
+ stamp2_outputs = get_target_outputs(":make_third_party_pkg_files_2_stamp") |
+ stamp3_outputs = get_target_outputs(":make_third_party_pkg_files_3_stamp") |
+ |
+ inputs = ["../tools/list_files.py"] + |
+ stamp0_outputs + |
+ stamp1_outputs + |
+ stamp2_outputs + |
+ stamp3_outputs |
+ |
+ outputs = [ |
+ "$root_gen_dir/pkg_files.stamp" |
+ ] |
+ |
+ script = "../tools/create_timestamp_file.py" |
+ args = [ |
+ rebase_path("$root_gen_dir/pkg_files.stamp"), |
+ ] |
+} |