build: Preliminary support for CM product builds
If building a cm_* product, skip crawling the filesystem for
AndroidProduct makefiles (and, of course, parsing their contents)
and aim directly for the device/cm/<product> device configuration
Change-Id: I2a5e70dda973a6fcdbba0d5e26b35b99d3f1aea2
Change how we search for CM makefiles.
build: Fix fastpath code for CM_BUILD
* We need to adjust to the new validations
Change-Id: I9066d4f437beb9597027ee6bbb52504b5e7e84c5
diff --git a/envsetup.sh b/envsetup.sh
index d126ebc..ae1e4c5 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -72,6 +72,14 @@
echo "Couldn't locate the top of the tree. Try setting TOP." >&2
return
fi
+
+ if (echo -n $1 | grep -q -e "^cm_") ; then
+ CM_BUILD=$(echo -n $1 | sed -e 's/^cm_//g')
+ else
+ CM_BUILD=
+ fi
+ export CM_BUILD
+
TARGET_PRODUCT=$1 \
TARGET_BUILD_VARIANT= \
TARGET_BUILD_TYPE= \