2 #----------------------------------------------------------------------------|
3 # Creates the links to use ddm{ui}lib in the eclipse-ide plugin.
4 # Run this from sdk/eclipse/scripts
5 #----------------------------------------------------------------------------|
16 if [ "${HOST:0:6}" == "CYGWIN" ]; then
17 PLATFORM="windows-x86"
19 # We can't use symlinks under Cygwin
21 function cpfile { # $1=dest $2=source
25 function cpdir() { # $1=dest $2=source
26 rsync -avW --delete-after $2 $1
30 if [ "$HOST" == "Linux" ]; then
32 elif [ "$HOST" == "Darwin" ]; then
35 echo "Unsupported platform ($HOST). Nothing done."
38 # For all other systems which support symlinks
40 # computes the "reverse" path, e.g. "a/b/c" => "../../.."
42 echo $1 | sed 's@[^/]*@..@g'
45 function cpfile { # $1=dest $2=source
46 ln -svf `back $1`/$2 $1/
49 function cpdir() { # $1=dest $2=source
50 ln -svf `back $1`/$2 $1
54 # CD to the top android directory
58 BASE="sdk/eclipse/plugins/com.android.ide.eclipse.ddms"
62 for i in prebuilt/common/jfreechart/*.jar; do
66 LIBS="ddmlib ddmuilib"
67 echo "make java libs ..."
68 make -j3 showcommands $LIBS || die "DDMS: Fail to build one of $LIBS."
71 cpfile $DEST out/host/$PLATFORM/framework/$LIB.jar
74 if [ "${HOST:0:6}" == "CYGWIN" ]; then
75 # On Windows we used to make a hard copy of the ddmlib/ddmuilib
76 # under the plugin source tree. Now that we're using external JARs
77 # we need to actually remove these obsolete sources.
78 for i in ddmlib ddmuilib ; do
79 DIR=$BASE/src/com/android/$i
81 rm -rfv $BASE/src/com/android/$i