From ed18741e07c5e344ff3375a293100ffb29f19b51 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 20 Jan 2009 14:03:55 -0800 Subject: auto import from //branches/cupcake/...@127101 --- core/Makefile | 9 ++++++++- core/definitions.mk | 12 +++--------- core/package.mk | 16 ++++++++++++---- 3 files changed, 23 insertions(+), 14 deletions(-) (limited to 'core') diff --git a/core/Makefile b/core/Makefile index 0d82299..a87f606 100644 --- a/core/Makefile +++ b/core/Makefile @@ -809,6 +809,11 @@ define package_files-copy-root fi endef +built_ota_tools := \ + $(hide) $(ACP) $(call intermediates-dir-for,EXECUTABLES,applypatch)/applypatch \ + $(hide) $(ACP) $(call intermediates-dir-for,EXECUTABLES,check_prereq)/check_prereq +$(BUILT_TARGET_FILES_PACKAGE): PRIVATE_OTA_TOOLS := $(built_ota_tools) + # Depending on the various images guarantees that the underlying # directories are up-to-date. $(BUILT_TARGET_FILES_PACKAGE): \ @@ -820,6 +825,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \ $(INSTALLED_USERDATAIMAGE_TARGET) \ $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ $(INTERNAL_OTA_SCRIPT_TARGET) \ + $(built_ota_tools) \ $(APKCERTS_FILE) \ | $(ACP) @echo "Package target files: $@" @@ -865,10 +871,11 @@ endif $(hide) $(call package_files-copy-root, \ $(TARGET_OUT_DATA),$(zip_root)/DATA) @# Extra contents of the OTA package - $(hide) mkdir -p $(zip_root)/OTA + $(hide) mkdir -p $(zip_root)/OTA/bin $(hide) $(call package_files-copy-root, \ $(INTERNAL_OTA_INTERMEDIATES_DIR),$(zip_root)/OTA) $(hide) $(ACP) $(INSTALLED_ANDROID_INFO_TXT_TARGET) $(zip_root)/OTA/ + $(hide) $(ACP) $(PRIVATE_OTA_TOOLS) $(zip_root)/OTA/bin/ @# Files that don't end up in any images, but are necessary to @# build them. $(hide) mkdir -p $(zip_root)/META diff --git a/core/definitions.mk b/core/definitions.mk index 780d8fb..67f7166 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -243,15 +243,9 @@ endef ########################################################### define find-subdir-assets -$(if $(1),\ - $(patsubst ./%,%, $(foreach dir,$(1),\ - $(shell if [ -d $(dir) ] ; then\ - cd $(dir) ; find ./ -type f -and -not -type l ;\ - fi \ - ) \ - )) \ -, \ - $(warning Empty argument supplied to find-subdir-assets) \ +$(if $(1),$(patsubst ./%,%, \ + $(shell if [ -d $(1) ] ; then cd $(1) ; find ./ -type f -and -not -type l ; fi)), \ + $(warning Empty argument supplied to find-subdir-assets) \ ) endef diff --git a/core/package.mk b/core/package.mk index ba41495..32f394f 100644 --- a/core/package.mk +++ b/core/package.mk @@ -65,9 +65,11 @@ LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets endif ifeq (,$(LOCAL_RESOURCE_DIR)) -LOCAL_RESOURCE_DIR := $(wildcard $(addsuffix /$(LOCAL_PATH)/res, $(PRODUCT_PACKAGE_OVERLAYS))) \ - $(LOCAL_PATH)/res + LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res endif +LOCAL_RESOURCE_DIR := \ + $(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(PRODUCT_PACKAGE_OVERLAYS))) \ + $(LOCAL_RESOURCE_DIR) # this is an app, so add the system libraries to the search path LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) @@ -77,8 +79,14 @@ LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) all_assets := $(call find-subdir-assets,$(LOCAL_ASSET_DIR)) all_assets := $(addprefix $(LOCAL_ASSET_DIR)/,$(patsubst assets/%,%,$(all_assets))) -all_resources := $(call find-subdir-assets,$(LOCAL_RESOURCE_DIR)) -all_resources := $(addprefix $(LOCAL_RESOURCE_DIR)/,$(patsubst res/%,%,$(all_resources))) +all_resources := $(strip \ + $(foreach dir, $(LOCAL_RESOURCE_DIR), \ + $(addprefix $(dir)/, \ + $(patsubst res/%,%, \ + $(call find-subdir-assets,$(dir)) \ + ) \ + ) \ + )) all_res_assets := $(strip $(all_assets) $(all_resources)) -- cgit v1.1