neilg 2003/02/17 10:33:30 Modified: java build.sh Log: fix for bug 16840; thanks to Jorg Pietschmann Revision Changes Path 1.9 +35 -16 xml-xerces/java/build.sh Index: build.sh =================================================================== RCS file: /home/cvs/xml-xerces/java/build.sh,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- build.sh 27 Sep 2002 22:31:03 -0000 1.8 +++ build.sh 17 Feb 2003 18:33:30 -0000 1.9 @@ -5,24 +5,43 @@ echo "------------------------" if [ "$JAVA_HOME" = "" ] ; then - echo "ERROR: JAVA_HOME not found in your environment." - echo - echo "Please, set the JAVA_HOME variable in your environment to match the" - echo "location of the Java Virtual Machine you want to use." - exit 1 + echo "ERROR: JAVA_HOME not found in your environment." + echo + echo "Please, set the JAVA_HOME variable in your environment to match the" + echo "location of the Java Virtual Machine you want to use." + exit 1 fi -# UNIX -CLPATHSEP=: -# if we're on a Windows box make it ; -uname | grep WIN && CLPATHSEP=\; - -# Keep this classpath to the minimum required to run ant -# Application dependent classpaths are specified in build.xml -LOCALCLASSPATH="$JAVA_HOME/lib/tools.jar${CLPATHSEP}${JAVA_HOME}/lib/classes.zip${CLPATHSEP}./tools/ant.jar${CLPATHSEP}./tools/xercesImpl.jar${CLPATHSEP}./tools/xml-apis.jar${CLPATHSEP}./tools/bin/xjavac.jar" -ANT_HOME=./tools +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +case "`uname`" in + CYGWIN*) cygwin=true ;; +esac -echo Building with classpath \"$LOCALCLASSPATH\" +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +LIBDIR=./tools +ANT_HOME="$LIBDIR" +LOCALCLASSPATH="$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip" +LOCALCLASSPATH="$LOCALCLASSPATH:$LIBDIR/ant.jar" +LOCALCLASSPATH="$LOCALCLASSPATH:$LIBDIR/xml-apis.jar" +LOCALCLASSPATH="$LOCALCLASSPATH:$LIBDIR/xercesImpl.jar" +LOCALCLASSPATH="$LOCALCLASSPATH:$LIBDIR/bin/xjavac.jar" + + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` +fi + +echo +echo Building with classpath $LOCALCLASSPATH echo Starting Ant... echo -"$JAVA_HOME"/bin/java -Dant.home="$ANT_HOME" -classpath "$LOCALCLASSPATH" org.apache.tools.ant.Main $@ + +"$JAVA_HOME"/bin/java -Dant.home="$ANT_HOME" -classpath "$LOCALCLASSPATH" org.apache.tools.ant.Main $@
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]