Browse Source

this makes ant work with jikes on OSX

i also generalized the case statement for figuring out the OS type
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269013 13f79535-47bb-0310-9956-ffa450edef68
master
Jon Scott Stevens 24 years ago
parent
commit
af81133ecc
1 changed files with 17 additions and 3 deletions
  1. +17
    -3
      src/script/ant

+ 17
- 3
src/script/ant View File

@@ -4,14 +4,16 @@ if [ -f $HOME/.antrc ] ; then
. $HOME/.antrc
fi

# Cygwin support. $cygwin _must_ be set to either true or false.
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
*) cygwin=false ;;
Darwin*) darwin=true ;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
if $cygwin ; then
[ -n "$ANT_HOME" ] &&
ANT_HOME=`cygpath --unix "$ANT_HOME"`
[ -n "$JAVA_HOME" ] &&
@@ -81,6 +83,18 @@ if [ "$JAVA_HOME" != "" ] ; then
if test -f $JAVA_HOME/lib/classes.zip ; then
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
fi

# OSX hack to make Ant work with jikes
if $darwin ; then
OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
if [ -d ${OSXHACK} ] ; then
for i in ${OSXHACK}/*.jar
do
JIKESPATH=$JIKESPATH:$i
done
fi
fi

else
echo "Warning: JAVA_HOME environment variable is not set."
echo " If build fails because sun.* classes could not be found"


Loading…
Cancel
Save