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

Unified Diff: utils/create_timestamp.gni

Issue 2379803002: Linux create_sdk GN build for host (Closed)
Patch Set: Move create_timestamp.gni Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/compiler/BUILD.gn ('k') | utils/dartanalyzer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/create_timestamp.gni
diff --git a/utils/create_timestamp.gni b/utils/create_timestamp.gni
new file mode 100644
index 0000000000000000000000000000000000000000..eb711aebe904302a9dfc519803dc5b54b5d9d035
--- /dev/null
+++ b/utils/create_timestamp.gni
@@ -0,0 +1,31 @@
+# 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.
+
+_dart_root = rebase_path("..")
+
+template("create_timestamp_file") {
+ assert(defined(invoker.pattern), "Must specify 'pattern'")
+ assert(defined(invoker.path), "Must specify 'path'")
+ assert(defined(invoker.output), "Must specify 'output'")
+ new_base = "."
+ if (defined(invoker.new_base)) {
+ new_base = invoker.new_base
+ }
+ current_base = "."
+ if (defined(invoker.current_base)) {
+ current_base = invoker.current_base
+ }
+ pattern = invoker.pattern
+ path = invoker.path
+ output = invoker.output
+ action(target_name) {
+ files = exec_script(
+ "$_dart_root/tools/list_files.py", [pattern, path], "list lines")
+ inputs = ["$_dart_root/tools/list_files.py"] +
+ rebase_path(files, new_base, current_base)
+ outputs = [ output ]
+ script = "$_dart_root/tools/create_timestamp_file.py"
+ args = [ rebase_path(output) ]
+ }
+}
« no previous file with comments | « utils/compiler/BUILD.gn ('k') | utils/dartanalyzer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698