mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 18:21:08 +00:00
Revert "Make list_files.py and list_dart_files.py return absolute paths"
This reverts commit a858542c89
.
mac gyp build fails.
Review-Url: https://codereview.chromium.org/2574523002 .
This commit is contained in:
parent
a858542c89
commit
b873e2b8e3
4
BUILD.gn
4
BUILD.gn
|
@ -88,7 +88,9 @@ action("create_sdk") {
|
|||
],
|
||||
"list lines")
|
||||
|
||||
inputs = sdk_lib_files + preamble_files + sdk_bin_files +
|
||||
inputs = rebase_path(sdk_lib_files, "", "sdk/lib") +
|
||||
rebase_path(preamble_files, "", "sdk/lib") +
|
||||
rebase_path(sdk_bin_files, "", "sdk/bin") +
|
||||
[
|
||||
"sdk/lib/dart_client.platform",
|
||||
"sdk/lib/dart_server.platform",
|
||||
|
|
|
@ -16,6 +16,7 @@ template("make_third_party_pkg_files_stamp") {
|
|||
pattern = invoker.pattern
|
||||
}
|
||||
path = path
|
||||
new_base = "//"
|
||||
output = "$target_gen_dir/third_party_pkg_files_$id.stamp"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -411,10 +411,10 @@ if (!defined(is_fuchsia) || !is_fuchsia) {
|
|||
|
||||
script = "../../tools/patch_sdk.py"
|
||||
|
||||
# We list all files which make up the sdk (modulo patches) and get them
|
||||
# back as a GN list object.
|
||||
# We list all files which make up the sdk (modulo patches) and get them back
|
||||
# as a GN list object.
|
||||
shared_sdk_sources = exec_script("../../tools/list_dart_files.py",
|
||||
[ rebase_path("../../sdk/lib") ],
|
||||
[ "../../sdk/lib" ],
|
||||
"list lines")
|
||||
|
||||
# We list the `patch_sdk.dart` tool here because the [script] (which is
|
||||
|
@ -423,8 +423,8 @@ if (!defined(is_fuchsia) || !is_fuchsia) {
|
|||
"../../tools/patch_sdk.dart",
|
||||
]
|
||||
|
||||
# Files below are not patches, they will not be in [concatenation_files]
|
||||
# but the `patch_sdk.dart` script will copy them into the patched sdk.
|
||||
# Files below are not patches, they will not be in [concatenation_files] but
|
||||
# the `patch_sdk.dart` script will copy them into the patched sdk.
|
||||
inputs += [
|
||||
"../lib/typed_data.dart",
|
||||
"../bin/builtin.dart",
|
||||
|
|
|
@ -16,8 +16,6 @@ import sys
|
|||
|
||||
def main(argv):
|
||||
directory = argv[1]
|
||||
if not os.path.isabs(directory):
|
||||
directory = os.path.realpath(directory)
|
||||
|
||||
pattern = None
|
||||
if len(argv) > 2:
|
||||
|
@ -36,7 +34,7 @@ def main(argv):
|
|||
|
||||
for filename in files:
|
||||
if filename.endswith('.dart') and not filename.endswith('_test.dart'):
|
||||
fullname = os.path.join(directory, root, filename)
|
||||
fullname = os.path.relpath(os.path.join(root, filename))
|
||||
fullname = fullname.replace(os.sep, '/')
|
||||
print fullname
|
||||
|
||||
|
|
|
@ -17,13 +17,11 @@ import sys
|
|||
def main(argv):
|
||||
pattern = re.compile(argv[1])
|
||||
for directory in argv[2:]:
|
||||
if not os.path.isabs(directory):
|
||||
directory = os.path.realpath(directory)
|
||||
for root, directories, files in os.walk(directory):
|
||||
if '.git' in directories:
|
||||
directories.remove('.git')
|
||||
for filename in files:
|
||||
fullname = os.path.join(directory, root, filename)
|
||||
fullname = os.path.relpath(os.path.join(root, filename))
|
||||
fullname = fullname.replace(os.sep, '/')
|
||||
if re.search(pattern, fullname):
|
||||
print fullname
|
||||
|
|
|
@ -7,6 +7,14 @@ _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) {
|
||||
|
@ -17,7 +25,8 @@ template("create_timestamp_file") {
|
|||
files = exec_script("$_dart_root/tools/list_dart_files.py",
|
||||
list_args,
|
||||
"list lines")
|
||||
inputs = [ "$_dart_root/tools/list_dart_files.py" ] + files
|
||||
inputs = [ "$_dart_root/tools/list_dart_files.py" ] +
|
||||
rebase_path(files, new_base, current_base)
|
||||
outputs = [
|
||||
output,
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue