summaryrefslogtreecommitdiffstats
path: root/core/distdir.mk
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
commit475fa12adef8fc2b08290555a33dc8a9fef05be4 (patch)
tree58df3e2bd95b7be3e2bddfa8bf2c95ea8a4fa613 /core/distdir.mk
parent35cfb08c588ba0af98ad0845ced6a9eeeeca4054 (diff)
downloadbuild-475fa12adef8fc2b08290555a33dc8a9fef05be4.zip
build-475fa12adef8fc2b08290555a33dc8a9fef05be4.tar.gz
build-475fa12adef8fc2b08290555a33dc8a9fef05be4.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'core/distdir.mk')
-rw-r--r--core/distdir.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/distdir.mk b/core/distdir.mk
index 777242b..e04938b 100644
--- a/core/distdir.mk
+++ b/core/distdir.mk
@@ -46,13 +46,20 @@ endef
# and "dist" is specified, the marked files will be copied to DIST_DIR.
#
# $(1): a list of goals (e.g. droid, sdk, pdk, ndk)
-# $(2): the dist files to add to those goals
+# $(2): the dist files to add to those goals. If the file contains ':',
+# the text following the colon is the name that the file is copied
+# to under the dist directory. Subdirs are ok, and will be created
+# at copy time if necessary.
define dist-for-goals
$(foreach file,$(2), \
+ $(eval fw := $(subst :,$(space),$(file))) \
+ $(eval src := $(word 1,$(fw))) \
+ $(eval dst := $(word 2,$(fw))) \
+ $(eval dst := $(if $(dst),$(dst),$(notdir $(src)))) \
$(eval \
$(call copy-one-dist-file, \
- $(file), \
- $(DIST_DIR)/$(notdir $(file)), \
+ $(src), \
+ $(DIST_DIR)/$(dst), \
$(1) \
) \
) \