mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 06:20:13 +00:00
ccfafee023
This makes doing an SDK build in the Fuchsia tree easier. The previous attempt at this change failed in gyp builds targeting xcode. They failed because input lists for actions of the same target (e.g. the actions for dartanalyzer) are merged and de-duped when the lists contain relative paths, but merged and *not* de-duped when the lists contain absolute paths. gyp rejects xcode files that it generated itself when they contain duplicate entries. This CL works around that bug, by using absolute paths in the GN build and keeping relative paths in the gyp build. R=rmacnak@google.com Review-Url: https://codereview.chromium.org/2567213002 .
64 lines
1.8 KiB
Text
64 lines
1.8 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.
|
|
|
|
import("../utils/create_timestamp.gni")
|
|
|
|
template("make_third_party_pkg_files_stamp") {
|
|
assert(defined(invoker.id), "Must define the stamp file id")
|
|
path = rebase_path("../third_party/pkg")
|
|
if (defined(invoker.path)) {
|
|
path = invoker.path
|
|
}
|
|
id = invoker.id
|
|
create_timestamp_file(target_name) {
|
|
if (defined(invoker.pattern)) {
|
|
pattern = invoker.pattern
|
|
}
|
|
path = path
|
|
output = "$target_gen_dir/third_party_pkg_files_$id.stamp"
|
|
}
|
|
}
|
|
|
|
make_third_party_pkg_files_stamp("make_third_party_pkg_files_0_stamp") {
|
|
path = rebase_path(".")
|
|
id = "0"
|
|
}
|
|
|
|
make_third_party_pkg_files_stamp("make_third_party_pkg_files_1_stamp") {
|
|
pattern = "[a-k].*"
|
|
id = "1"
|
|
}
|
|
|
|
make_third_party_pkg_files_stamp("make_third_party_pkg_files_2_stamp") {
|
|
pattern = "[l-r].*"
|
|
id = "2"
|
|
}
|
|
|
|
make_third_party_pkg_files_stamp("make_third_party_pkg_files_3_stamp") {
|
|
pattern = "[s-z].*"
|
|
id = "3"
|
|
}
|
|
|
|
action("pkg_files_stamp") {
|
|
deps = [
|
|
":make_third_party_pkg_files_0_stamp",
|
|
":make_third_party_pkg_files_1_stamp",
|
|
":make_third_party_pkg_files_2_stamp",
|
|
":make_third_party_pkg_files_3_stamp",
|
|
]
|
|
|
|
stamp0_outputs = get_target_outputs(":make_third_party_pkg_files_0_stamp")
|
|
stamp1_outputs = get_target_outputs(":make_third_party_pkg_files_1_stamp")
|
|
stamp2_outputs = get_target_outputs(":make_third_party_pkg_files_2_stamp")
|
|
stamp3_outputs = get_target_outputs(":make_third_party_pkg_files_3_stamp")
|
|
|
|
inputs = stamp0_outputs + stamp1_outputs + stamp2_outputs + stamp3_outputs
|
|
|
|
outputs = [
|
|
"$root_gen_dir/pkg_files.stamp",
|
|
]
|
|
|
|
script = "../tools/create_timestamp_file.py"
|
|
args = [ rebase_path("$root_gen_dir/pkg_files.stamp") ]
|
|
}
|