From af81133ecce548bbb1203c410c2ebaf5d8c456da Mon Sep 17 00:00:00 2001 From: Jon Scott Stevens Date: Tue, 8 May 2001 01:24:49 +0000 Subject: [PATCH] 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 --- src/script/ant | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/script/ant b/src/script/ant index b43cc18d0..6245cff3e 100644 --- a/src/script/ant +++ b/src/script/ant @@ -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"