You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/08/24 14:18:31 UTC
svn commit: r569363 - /harmony/enhanced/drlvm/trunk/build/build.sh
Author: gshimansky
Date: Fri Aug 24 05:18:31 2007
New Revision: 569363
URL: http://svn.apache.org/viewvc?rev=569363&view=rev
Log:
Applied patch from HARMONY-4674
[drlvm][build] build.sh does not work with ant provided by Gentoo distribution
Modified:
harmony/enhanced/drlvm/trunk/build/build.sh
Modified: harmony/enhanced/drlvm/trunk/build/build.sh
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/build.sh?rev=569363&r1=569362&r2=569363&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/build.sh (original)
+++ harmony/enhanced/drlvm/trunk/build/build.sh Fri Aug 24 05:18:31 2007
@@ -37,12 +37,21 @@
# Check external resources / software installation
# ================================================
+if [ -x "$ANT_HOME/bin/ant" ]; then
+ # running locally installed ant
+ ANT_COMMAND="$ANT_HOME/bin/ant --noconfig"
+elif [ -x "`which ant 2>/dev/null`" ]; then
+ # running pre-installed ant from GNU/Linux distribution
+ ANT_COMMAND="`which ant`"
+fi
+
+
if [ ! -x $JAVA_HOME/bin/java ] ; then
echo "* Neither $JAVA_HOME/bin/java not found."
echo "* Make sure you have J2SDK or DRLVM installed on your computer and that"
echo "* JAVA_HOME environment variable points out to its installation dir"
ERROR
-elif [ ! -x $ANT_HOME/bin/ant ]; then
+elif [ ! -x "${ANT_COMMAND%% *}" ]; then
echo "* File $ANT_HOME/bin/ant not found."
echo "* Make sure you have Ant 1.6.5 or above installed from"
echo "* http://ant.apache.org/bindownload.cgi and that ANT_HOME environment"
@@ -61,8 +70,4 @@
CLASSPATH=`pwd`/make/tmp/ant-contrib.jar:$CLASSPATH
export CLASSPATH
-ANT_COMMAND="$ANT_HOME/bin/ant --noconfig"
-
$ANT_COMMAND -f ./make/build.xml "$@" || ERROR
-
-