summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/build/config/android/copy_ex.gni
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/libwebrtc/build/config/android/copy_ex.gni
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/build/config/android/copy_ex.gni')
-rw-r--r--third_party/libwebrtc/build/config/android/copy_ex.gni72
1 files changed, 72 insertions, 0 deletions
diff --git a/third_party/libwebrtc/build/config/android/copy_ex.gni b/third_party/libwebrtc/build/config/android/copy_ex.gni
new file mode 100644
index 0000000000..d3705dd7ef
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/copy_ex.gni
@@ -0,0 +1,72 @@
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Copy a list of file into a destination directory. Potentially renaming
+# files are they are copied. This also ensures that symlinks are followed
+# during the copy (i.e. the symlinks are never copied, only their content).
+#
+# Variables:
+# dest: Destination directory path.
+# sources: List of source files or directories to copy to dest.
+# renaming_sources: Optional list of source file paths that will be renamed
+# during the copy operation. If provided, renaming_destinations is required.
+# renaming_destinations: Optional list of destination file paths, required
+# when renaming_sources is provided. Both lists should have the same size
+# and matching entries.
+# args: Optional. Additionnal arguments to the copy_ex.py script.
+#
+# The following variables have the usual GN meaning: data, deps, inputs,
+# outputs, testonly, visibility.
+
+import("//build/config/python.gni")
+
+template("copy_ex") {
+ action_with_pydeps(target_name) {
+ forward_variables_from(invoker,
+ [
+ "data",
+ "deps",
+ "public_deps",
+ "testonly",
+ "visibility",
+ ])
+ sources = []
+ if (defined(invoker.sources)) {
+ sources += invoker.sources
+ }
+ outputs = []
+ if (defined(invoker.outputs)) {
+ outputs += invoker.outputs
+ }
+ if (defined(invoker.inputs)) {
+ inputs = invoker.inputs
+ }
+
+ script = "//build/android/gyp/copy_ex.py"
+
+ args = [
+ "--dest",
+ rebase_path(invoker.dest, root_build_dir),
+ ]
+ rebased_sources = rebase_path(sources, root_build_dir)
+ args += [ "--files=$rebased_sources" ]
+
+ if (defined(invoker.args)) {
+ args += invoker.args
+ }
+
+ if (defined(invoker.renaming_sources) &&
+ defined(invoker.renaming_destinations)) {
+ sources += invoker.renaming_sources
+ renaming_destinations = invoker.renaming_destinations
+ outputs +=
+ get_path_info(rebase_path(renaming_destinations, ".", invoker.dest),
+ "abspath")
+ rebased_renaming_sources =
+ rebase_path(invoker.renaming_sources, root_build_dir)
+ args += [ "--renaming-sources=$rebased_renaming_sources" ]
+ args += [ "--renaming-destinations=$renaming_destinations" ]
+ }
+ }
+}