jon 00/12/04 23:14:52
Modified: src/bin ant
Log:
added support for cygwin
re-organized things
fixed a couple bugs
correctly set environment variables
all in all, i can now build Ant under cygwin on win98.
Revision Changes Path
1.10 +26 -5 jakarta-ant/src/bin/ant
Index: ant
===================================================================
RCS file: /home/cvs/jakarta-ant/src/bin/ant,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ant 2000/12/03 01:54:34 1.9
+++ ant 2000/12/05 07:14:51 1.10
@@ -5,7 +5,7 @@
fi
# Cygwin support.
-if [ "$OSTYPE" == "cygwin32" ] || [ "$OSTYPE" = "cygwin" ]; then
+if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ]; then
if [ ! "$ANT_HOME" = "" ]; then
ANT_HOME=`cygpath --path --unix $ANT_HOME`
@@ -47,12 +47,34 @@
# Allow .antrc to specifiy flags to java cmd
if [ "$JAVACMD" = "" ] ; then
- JAVACMD=java
+ JAVACMD=${JAVA_HOME}/bin/java
fi
-LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`
+# add in the dependency .jar files
+DIRLIBS=${ANT_HOME}/lib/*.jar
+for i in ${DIRLIBS}
+do
+ # if the directory is empty, then it will return the input string
+ # this is stupid, so case for it
+ if [ "$i" != "${DIRLIBS}" ] ; then
+ LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
+ fi
+done
+DIRCORELIBS=${ANT_HOME}/lib/core/*.jar
+for i in ${DIRCORELIBS}
+do
+ # if the directory is empty, then it will return the input string
+ # this is stupid, so case for it
+ if [ "$i" != "${DIRCORELIBS}" ] ; then
+ LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
+ fi
+done
if [ "$CLASSPATH" != "" ] ; then
+ # More Cygwin support
+ if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+ fi
LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
fi
@@ -81,9 +103,8 @@
fi
# More Cygwin support
-if [ "$OSTYPE" == "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
+if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
fi
$JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS
org.apache.tools.ant.Main $@
-