[script] generate cscope and ctags for android
This commit is contained in:
parent
ad4c6c83cb
commit
cdf21d7d10
@ -1,7 +1,38 @@
|
|||||||
DIR="dalvik device frameworks hardware libnativehelper system "
|
DIR="bionic dalvik device frameworks hardware libnativehelper system packages"
|
||||||
TMP=$(mktemp /tmp/XXXXX-cscope.files)
|
TMP=$(mktemp /tmp/XXXXX-cscope.files)
|
||||||
|
|
||||||
echo "$TMP"
|
gettop ()
|
||||||
|
{
|
||||||
|
local TOPFILE=build/core/envsetup.mk;
|
||||||
|
if [ -n "$TOP" -a -f "$TOP/$TOPFILE" ]; then
|
||||||
|
echo $TOP;
|
||||||
|
else
|
||||||
|
if [ -f $TOPFILE ]; then
|
||||||
|
PWD= /bin/pwd;
|
||||||
|
else
|
||||||
|
local HERE=$PWD;
|
||||||
|
T=;
|
||||||
|
while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
|
||||||
|
\cd ..;
|
||||||
|
T=`PWD= /bin/pwd`;
|
||||||
|
done;
|
||||||
|
\cd $HERE;
|
||||||
|
if [ -f "$T/$TOPFILE" ]; then
|
||||||
|
echo $T;
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
T=$(gettop);
|
||||||
|
if [ "$T" ]; then
|
||||||
|
\cd $(gettop);
|
||||||
|
else
|
||||||
|
echo "Couldn't locate the top of the tree. Try setting TOP.";
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
for dir in $DIR;
|
for dir in $DIR;
|
||||||
do
|
do
|
||||||
echo "Looking for files in $dir"
|
echo "Looking for files in $dir"
|
||||||
@ -11,4 +42,7 @@ done
|
|||||||
echo "generate cscope"
|
echo "generate cscope"
|
||||||
cscope -bkq -i $TMP
|
cscope -bkq -i $TMP
|
||||||
|
|
||||||
|
echo "generate ctags"
|
||||||
|
ctags --c-kinds=+px --c++-kinds=+px --fields=+iaS --extra=+q -L $TMP
|
||||||
|
|
||||||
rm $TMP
|
rm $TMP
|
||||||
|
Loading…
Reference in New Issue
Block a user