Merge "Support <dir>:<file> for LOCAL_JAVA_RESOURCE_FILES"
am: b6fc0a1cae
Change-Id: I4e082de7606caafb56cd7e9fff51fa571073e635
This commit is contained in:
@@ -105,12 +105,18 @@ ifneq ($(LOCAL_JAVA_RESOURCE_DIRS),)
|
|||||||
java_resource_file_groups := $(filter-out %:,$(java_resource_file_groups))
|
java_resource_file_groups := $(filter-out %:,$(java_resource_file_groups))
|
||||||
endif # LOCAL_JAVA_RESOURCE_DIRS
|
endif # LOCAL_JAVA_RESOURCE_DIRS
|
||||||
|
|
||||||
LOCAL_JAVA_RESOURCE_FILES := $(strip $(LOCAL_JAVA_RESOURCE_FILES))
|
|
||||||
ifneq ($(LOCAL_JAVA_RESOURCE_FILES),)
|
ifneq ($(LOCAL_JAVA_RESOURCE_FILES),)
|
||||||
java_resource_file_groups += \
|
# Converts LOCAL_JAVA_RESOURCE_FILES := <file> to $(dir $(file))::$(notdir $(file))
|
||||||
$(foreach f,$(LOCAL_JAVA_RESOURCE_FILES), \
|
# and LOCAL_JAVA_RESOURCE_FILES := <dir>:<file> to <dir>::<file>
|
||||||
$(patsubst %/,%,$(dir $(f)))::$(notdir $(f)) \
|
java_resource_file_groups += $(strip $(foreach res,$(LOCAL_JAVA_RESOURCE_FILES), \
|
||||||
)
|
$(eval _file := $(call word-colon,2,$(res))) \
|
||||||
|
$(if $(_file), \
|
||||||
|
$(eval _base := $(call word-colon,1,$(res))), \
|
||||||
|
$(eval _base := $(dir $(res))) \
|
||||||
|
$(eval _file := $(notdir $(res)))) \
|
||||||
|
$(if $(filter /%,$(_base) $(_file)),$(call pretty-error,LOCAL_JAVA_RESOURCE_FILES may not include absolute paths: $(_base) $(_file))) \
|
||||||
|
$(patsubst %/,%,$(_base))::$(_file)))
|
||||||
|
|
||||||
endif # LOCAL_JAVA_RESOURCE_FILES
|
endif # LOCAL_JAVA_RESOURCE_FILES
|
||||||
|
|
||||||
ifdef java_resource_file_groups
|
ifdef java_resource_file_groups
|
||||||
|
Reference in New Issue
Block a user