Allow multiple directories in LOCAL_RESOURCE_DIR

Before, LOCAL_RESOURCE_DIR got messed up when the build system
tried to find the whole LOCAL_RESOURCE_DIR string in each
overlay directory.

This change splits LOCAL_RESOURCE_DIR before appending it to
the overlay directory paths.

I've verified that this now works:

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/overlay $(LOCAL_PATH)/res

Change-Id: Iea47f94a14720af0ca4b422aec30acf4acbe13cf
This commit is contained in:
Bjorn Bringert
2010-01-14 17:33:44 +00:00
parent 923d541486
commit a7ab17d0a3

View File

@@ -69,8 +69,10 @@ ifeq (,$(LOCAL_RESOURCE_DIR))
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
endif
LOCAL_RESOURCE_DIR := \
$(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(PRODUCT_PACKAGE_OVERLAYS))) \
$(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(DEVICE_PACKAGE_OVERLAYS))) \
$(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
$(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
$(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
$(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
$(LOCAL_RESOURCE_DIR)
# this is an app, so add the system libraries to the search path