summaryrefslogtreecommitdiffstats
path: root/core/definitions.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-04-08 18:08:46 -0700
committerYing Wang <wangying@google.com>2015-04-08 18:08:46 -0700
commitd9509e970c6314ca4702c0d30022e3fe49a867f3 (patch)
tree96ec4923deb8c81e691b444a0285e86bcca0d699 /core/definitions.mk
parent324784ab85bdf555cb9325ca650b991529a85fe7 (diff)
parent133415d55129b6b29e2bf4454fcbf07c9957f251 (diff)
downloadbuild-d9509e970c6314ca4702c0d30022e3fe49a867f3.zip
build-d9509e970c6314ca4702c0d30022e3fe49a867f3.tar.gz
build-d9509e970c6314ca4702c0d30022e3fe49a867f3.tar.bz2
resolved conflicts for merge of 133415d5 to master
Change-Id: Iba6c1dd40e7a4c8058e7100f03296c8f72a2c949
Diffstat (limited to 'core/definitions.mk')
-rw-r--r--core/definitions.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/definitions.mk b/core/definitions.mk
index 93cd07f..5b913db 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2278,6 +2278,17 @@ define transform-prebuilt-to-target-strip-comments
$(copy-file-to-target-strip-comments)
endef
+# Copy a list of files/directories to target location, with sub dir structure preserved.
+# For example $(HOST_OUT_EXECUTABLES)/aapt -> $(staging)/bin/aapt .
+# $(1): the source list of files/directories.
+# $(2): the path prefix to strip. In the above example it would be $(HOST_OUT).
+# $(3): the target location.
+define copy-files-with-structure
+$(foreach t,$(1),\
+ $(eval s := $(patsubst $(2)%,%,$(t)))\
+ $(hide) mkdir -p $(dir $(3)/$(s)); cp -Rf $(t) $(3)/$(s)$(newline))
+endef
+
###########################################################
## On some platforms (MacOS), after copying a static
## library, ranlib must be run to update an internal