Created
May 26, 2015 21:02
-
-
Save sr105/e9143d4ee00465f71def to your computer and use it in GitHub Desktop.
android mm()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mm () | |
{ | |
if [ -f build/core/envsetup.mk -a -f Makefile ]; then | |
make $@; | |
else | |
T=$(gettop); | |
local M=$(findmakefile); | |
local MODULES=; | |
local GET_INSTALL_PATH=; | |
local ARGS=; | |
local M=`echo $M|sed 's:'$T'/::'`; | |
if [ ! "$T" ]; then | |
echo "Couldn't locate the top of the tree. Try setting TOP."; | |
else | |
if [ ! "$M" ]; then | |
echo "Couldn't locate a makefile from the current directory."; | |
else | |
for ARG in $@; | |
do | |
case $ARG in | |
GET-INSTALL-PATH) | |
GET_INSTALL_PATH=$ARG | |
;; | |
esac; | |
done; | |
if [ -n "$GET_INSTALL_PATH" ]; then | |
MODULES=; | |
ARGS=GET-INSTALL-PATH; | |
else | |
MODULES=all_modules; | |
ARGS=$@; | |
fi; | |
ONE_SHOT_MAKEFILE=$M make -C $T -f build/core/main.mk $MODULES $ARGS; | |
fi; | |
fi; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment