build
Revision | 5f04d9d9b2f65a20c5d31392426a224acbc331ae (tree) |
---|---|
Time | 2017-09-19 22:42:15 |
Author | Colin Cross <ccross@andr...> |
Commiter | Michael Bestas |
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
@@ -426,7 +426,7 @@ endef | ||
426 | 426 | define find-subdir-assets |
427 | 427 | $(sort $(if $(1),$(patsubst ./%,%, \ |
428 | 428 | $(shell if [ -d $(1) ] ; then cd $(1) ; find -L ./ -not -name '.*' -and -type f -and -not -type l ; fi)), \ |
429 | - $(warning Empty argument supplied to find-subdir-assets) \ | |
429 | + $(warning Empty argument supplied to find-subdir-assets in $(LOCAL_PATH)) \ | |
430 | 430 | )) |
431 | 431 | endef |
432 | 432 |
@@ -140,9 +140,9 @@ my_overlay_resources := $(strip \ | ||
140 | 140 | $(addprefix $(d)/, \ |
141 | 141 | $(call find-subdir-assets,$(d))))) |
142 | 142 | |
143 | -my_res_resources := $(strip \ | |
143 | +my_res_resources := $(if $(my_res_dir),$(strip \ | |
144 | 144 | $(addprefix $(my_res_dir)/, \ |
145 | - $(call find-subdir-assets,$(my_res_dir)))) | |
145 | + $(call find-subdir-assets,$(my_res_dir))))) | |
146 | 146 | |
147 | 147 | all_resources := $(strip $(my_res_resources) $(my_overlay_resources)) |
148 | 148 |