From 475fa12adef8fc2b08290555a33dc8a9fef05be4 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 10 Feb 2009 15:43:57 -0800 Subject: auto import from //branches/cupcake/...@130745 --- core/distdir.mk | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'core/distdir.mk') 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) \ ) \ ) \ -- cgit v1.1