dart-sdk/utils/create_timestamp.gni
Zachary Anderson 7c784cea9f Linux create_sdk GN build for host
This CL enables GN builds of all targets from dart.gyp
on Linux for the host (i.e. ia32, x64).

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2379803002 .
2016-09-29 13:23:00 -07:00

32 lines
1.1 KiB
Plaintext

# 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) ]
}
}