Use consistent search depth.
AndroidProducts.mk allows for a maxdepth of 4 in device and vendor while
vendorsetup.sh and BoardConfig.mk only allow for smaller depth.
Make search depth consistent for these files.
Change-Id: I406770c1423d4f27fe097956a7c705a0da937e35
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Laurent Fert <laurent.fert@intel.com>
Signed-off-by: Guilhem Imberton <guilhem.imberton@intel.com>
Author: Laurent Fert <laurent.fert@intel.com>
diff --git a/core/config.mk b/core/config.mk
index e008a64..a2aa3da 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -143,8 +143,8 @@
board_config_mk := \
$(strip $(wildcard \
$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \
- device/*/$(TARGET_DEVICE)/BoardConfig.mk \
- vendor/*/$(TARGET_DEVICE)/BoardConfig.mk \
+ $(shell test -d device && find device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
+ $(shell test -d vendor && find vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
))
ifeq ($(board_config_mk),)
$(error No config file found for TARGET_DEVICE $(TARGET_DEVICE))