Code drop from //branches/cupcake/...@124589

This commit is contained in:
The Android Open Source Project
2008-12-17 18:04:04 -08:00
parent 5c11852110
commit e943f2fd8e
659 changed files with 47382 additions and 9976 deletions

View File

@@ -1,42 +1,50 @@
#!/bin/bash
function die() {
echo "Error: $*"
exit 1
echo "Error: $*"
exit 1
}
set -e # fail early
# This may run either from the //device directory or from the
# eclipse/script directory. Allow for both.
D="device/tools/eclipse/scripts"
[ -d "$D" ] && cd "$D"
[ -d "../$D" ] && cd "../$D"
# CD to the top android directory
D=`dirname "$0"`
cd "$D/../../../../"
DEST="development/tools/eclipse/plugins/com.android.ide.eclipse.adt"
# computes "../.." from DEST to here (in /android)
BACK=`echo $DEST | sed 's@[^/]*@..@g'`
LIBS="sdkstats jarutils androidprefs layoutlib_api layoutlib_utils ninepatch sdklib sdkuilib"
echo "make java libs ..."
make -j3 showcommands $LIBS || die "ADT: Fail to build one of $LIBS."
echo "Copying java libs to $DEST"
cd ../plugins/com.android.ide.eclipse.adt
HOST=`uname`
if [ "$HOST" == "Linux" ]; then
ln -svf ../../../../out/host/linux-x86/framework/jarutils.jar .
ln -svf ../../../../out/host/linux-x86/framework/androidprefs.jar .
for LIB in $LIBS; do
ln -svf $BACK/out/host/linux-x86/framework/$LIB.jar "$DEST/"
done
ln -svf $BACK/out/host/linux-x86/framework/kxml2-2.3.0.jar "$DEST/"
elif [ "$HOST" == "Darwin" ]; then
ln -svf ../../../../out/host/darwin-x86/framework/jarutils.jar .
ln -svf ../../../../out/host/darwin-x86/framework/androidprefs.jar .
for LIB in $LIBS; do
ln -svf $BACK/out/host/darwin-x86/framework/$LIB.jar "$DEST/"
done
ln -svf $BACK/out/host/darwin-x86/framework/kxml2-2.3.0.jar "$DEST/"
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
for LIB in $LIBS; do
cp -vf out/host/windows-x86/framework/$LIB.jar "$DEST/"
done
DEVICE_DIR="../../../.."
echo "make java libs ..."
( cd "$DEVICE_DIR" &&
make -j3 showcommands jarutils androidprefs ) || \
die "Define javac and retry."
if [ ! -f "$DEST/kxml2-2.3.0.jar" ]; then
cp -v "prebuilt/common/kxml2/kxml2-2.3.0.jar" "$DEST/"
fi
for DIR in "$PWD" ; do
echo "Copying java libs to $DIR"
for JAR in jarutils.jar androidprefs.jar ; do
cp -vf "$DEVICE_DIR/out/host/windows-x86/framework/$JAR" "$DIR"
done
done
chmod a+rx *.jar
chmod -v a+rx "$DEST"/*.jar
else
echo "Unsupported platform ($HOST). Nothing done."
echo "Unsupported platform ($HOST). Nothing done."
fi