mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
ee21a2261d
To track https://codereview.chromium.org/2391863002/ on the gyp side, and use it in more places. R=johnmccutchan@google.com Review URL: https://codereview.chromium.org/2392253002 .
33 lines
1.1 KiB
Text
33 lines
1.1 KiB
Text
# 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.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
|
|
}
|
|
path = invoker.path
|
|
output = invoker.output
|
|
action(target_name) {
|
|
list_args = [path]
|
|
if (defined(invoker.pattern)) {
|
|
list_args += [invoker.pattern]
|
|
}
|
|
files = exec_script(
|
|
"$_dart_root/tools/list_dart_files.py", list_args, "list lines")
|
|
inputs = ["$_dart_root/tools/list_dart_files.py"] +
|
|
rebase_path(files, new_base, current_base)
|
|
outputs = [ output ]
|
|
script = "$_dart_root/tools/create_timestamp_file.py"
|
|
args = [ rebase_path(output) ]
|
|
}
|
|
}
|