2016-09-29 20:23:00 +00:00
|
|
|
# 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'")
|
|
|
|
path = invoker.path
|
|
|
|
output = invoker.output
|
|
|
|
action(target_name) {
|
2016-10-27 11:25:34 +00:00
|
|
|
list_args = [ path ]
|
2016-10-05 14:50:40 +00:00
|
|
|
if (defined(invoker.pattern)) {
|
2016-10-27 11:25:34 +00:00
|
|
|
list_args += [ invoker.pattern ]
|
2016-10-05 14:50:40 +00:00
|
|
|
}
|
2016-10-27 11:25:34 +00:00
|
|
|
files = exec_script("$_dart_root/tools/list_dart_files.py",
|
2016-12-13 18:01:28 +00:00
|
|
|
[ "absolute" ] + list_args,
|
2016-10-27 11:25:34 +00:00
|
|
|
"list lines")
|
2016-12-13 18:01:28 +00:00
|
|
|
inputs = [ "$_dart_root/tools/list_dart_files.py" ] + files
|
2020-03-10 21:56:11 +00:00
|
|
|
outputs = [ output ]
|
2016-09-29 20:23:00 +00:00
|
|
|
script = "$_dart_root/tools/create_timestamp_file.py"
|
|
|
|
args = [ rebase_path(output) ]
|
|
|
|
}
|
|
|
|
}
|