From fe109634964ad75e1c35872eb6e37c55e76e44bc Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 29 Nov 2016 11:12:56 -0800 Subject: [PATCH] Fix warning with AAPT2 and LOCAL_STATIC_ANDROID_LIBRARIES Building with LOCAL_STATIC_ANDROID_LIBARIES and LOCAL_USE_APPT2 causes a warning: build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets Only call find-subdir-assets if my_res_dir is not empty. Also improve the warning message to make it easier to find the module that caused it. Test: m -j Change-Id: I9a71162c7e2ed82f64d6844baca256968ac77317 --- core/definitions.mk | 2 +- core/package_internal.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index 7a42ad8f1..2f6cdae6b 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -417,7 +417,7 @@ endef define find-subdir-assets $(sort $(if $(1),$(patsubst ./%,%, \ $(shell if [ -d $(1) ] ; then cd $(1) ; find -L ./ -not -name '.*' -and -type f ; fi)), \ - $(warning Empty argument supplied to find-subdir-assets) \ + $(warning Empty argument supplied to find-subdir-assets in $(LOCAL_PATH)) \ )) endef diff --git a/core/package_internal.mk b/core/package_internal.mk index af1d2a5dc..5dd021ccd 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -140,9 +140,9 @@ my_overlay_resources := $(strip \ $(addprefix $(d)/, \ $(call find-subdir-assets,$(d))))) -my_res_resources := $(strip \ +my_res_resources := $(if $(my_res_dir),$(strip \ $(addprefix $(my_res_dir)/, \ - $(call find-subdir-assets,$(my_res_dir)))) + $(call find-subdir-assets,$(my_res_dir))))) all_resources := $(strip $(my_res_resources) $(my_overlay_resources)) -- 2.11.0