envsetup,product,ninja: enable symlink traversal
When searching device, product, or hardware, allow
find to follow symlinks.
Add KATI_EMULATE_FIND=false to allow disabling the find
emulator which changes findleaves.py behavior wrt
symlinks.
BUG=24605247
TEST=works with CL:783781 (without the find wrapper in that CL)
Change-Id: Ia9d0e4add391a56f34828a09a6cec3f435ccc548
diff --git a/core/product.mk b/core/product.mk
index 3b78337..d6f2860 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -28,9 +28,9 @@
# $(call ) isn't necessary.
#
define _find-android-products-files
-$(sort $(shell test -d device && find device -maxdepth 6 -name AndroidProducts.mk)) \
- $(sort $(shell test -d vendor && find vendor -maxdepth 6 -name AndroidProducts.mk)) \
- $(sort $(shell test -d product && find product -maxdepth 6 -name AndroidProducts.mk)) \
+$(sort $(shell test -d device && find -L device -maxdepth 6 -name AndroidProducts.mk)) \
+ $(sort $(shell test -d vendor && find -L vendor -maxdepth 6 -name AndroidProducts.mk)) \
+ $(sort $(shell test -d product && find -L product -maxdepth 6 -name AndroidProducts.mk)) \
$(SRC_TARGET_DIR)/product/AndroidProducts.mk
endef