diff options
author | Ying Wang <wangying@google.com> | 2014-07-29 10:34:30 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2014-09-20 14:16:09 -0700 |
commit | 4cb0499a5d6875fc13107f237779fb0422b4f7f2 (patch) | |
tree | eb69d70f59e49fd49c933204fa6694f124634fdb /core/package_internal.mk | |
parent | e3386105e31971378386ef2fe8480aacfc082ea0 (diff) | |
download | build-4cb0499a5d6875fc13107f237779fb0422b4f7f2.zip build-4cb0499a5d6875fc13107f237779fb0422b4f7f2.tar.gz build-4cb0499a5d6875fc13107f237779fb0422b4f7f2.tar.bz2 |
Allow LOCAL_ASSET_DIR point to nonexistent dir
LOCAL_ASSET_DIR may point to a dir generated during the build process.
We have done similiar things to LOCAL_RESOURCE_DIR.
(cherry picked from commit bfcdf060bab129581acff32eb70896f719162bc9)
Bug: 16563899
Change-Id: Iaa72196e1e6350ae0720f8a4e0abc68d8d7ed642
Diffstat (limited to 'core/package_internal.mk')
-rw-r--r-- | core/package_internal.mk | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/package_internal.mk b/core/package_internal.mk index d1e4212..6ce3678 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -72,8 +72,11 @@ ifdef LOCAL_PACKAGE_SPLITS LOCAL_AAPT_FLAGS += $(addprefix --split ,$(LOCAL_PACKAGE_SPLITS)) endif +need_compile_asset := ifeq (,$(LOCAL_ASSET_DIR)) LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets +else +need_compile_asset := true endif # LOCAL_RESOURCE_DIR may point to resource generated during the build @@ -101,6 +104,10 @@ all_assets := $(strip \ ) \ )) +ifneq ($(all_assets),) +need_compile_asset := true +endif + all_resources := $(strip \ $(foreach dir, $(LOCAL_RESOURCE_DIR), \ $(addprefix $(dir)/, \ @@ -119,7 +126,7 @@ all_res_assets := $(strip $(all_assets) $(all_resources)) package_expected_intermediates_COMMON := $(call local-intermediates-dir,COMMON) # If no assets or resources were found, clear the directory variables so # we don't try to build them. -ifeq (,$(all_assets)) +ifneq (true,$(need_compile_asset)) LOCAL_ASSET_DIR:= endif ifneq (true,$(need_compile_res)) |