summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorConor MacNeill <conor@apache.org>2001-01-30 15:08:30 +0000
committerConor MacNeill <conor@apache.org>2001-01-30 15:08:30 +0000
commit90380952be94be5a64070fbd671ded36d87f1d9f (patch)
tree0034ad85f799e5dc4bfde7fb38218edbb97b0709 /build.sh
parent4fd9a820a0967d106cf2124caf51f664868854bd (diff)
downloadant-90380952be94be5a64070fbd671ded36d87f1d9f.tar.gz
Revert build process to old style for 1.3 release
Rewrote build.xml using most of the ideas from the new build process git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268542 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh61
1 files changed, 9 insertions, 52 deletions
diff --git a/build.sh b/build.sh
index 0445db994..fc1828b6d 100755
--- a/build.sh
+++ b/build.sh
@@ -1,59 +1,16 @@
#!/bin/sh
-if test ! -f build/classes/org/apache/tools/ant/Main.class ; then
- ./bootstrap.sh $*
-fi
-
-# Cygwin support. $cygwin _must_ be set to either true or false.
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- *) cygwin=false ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin; then
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-LOCALCLASSPATH=`echo lib/*.jar | tr ' ' ':'`
-LOCALCLASSPATH=$LOCALCLASSPATH:build/classes:lib/optional/junit.jar
-
-if [ "$CLASSPATH" != "" ] ; then
- LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
-fi
+REALANTHOME=$ANT_HOME
+ANT_HOME=.
+export ANT_HOME
-if [ "$JAVA_HOME" != "" ] ; then
- if test -f $JAVA_HOME/lib/tools.jar ; then
- LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
- fi
-
- if test -f $JAVA_HOME/lib/classes.zip ; then
- LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
- fi
-else
- echo "Warning: JAVA_HOME environment variable is not set."
- echo " If build fails because sun.* classes could not be found"
- echo " you will need to set the JAVA_HOME environment variable"
- echo " to the installation directory of java."
-fi
-
-if [ ! -x "$JAVA_HOME/bin/java" ] ; then
- echo "Error: JAVA_HOME is not defined correctly."
- echo " We cannot execute JAVA_HOME/bin/java"
- exit
-fi
+if test ! -f lib/ant.jar -o ! -x bin/ant -o ! -x bin/antRun ; then
+ ./bootstrap.sh
+fi
-# For Cygwin, switch paths to Windows format before running javac
-if $cygwin; then
- LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
+if [ "$REALANTHOME" != "" ] ; then
+ ANT_INSTALL="-Dant.install $REALANTHOME"
fi
-NEW_ANT_HOME=$ANT_HOME
-if [ ! "$NEW_ANT_HOME" ] ; then
- NEW_ANT_HOME=dist
-fi
+bin/ant $ANT_INSTALL $*
-${JAVA_HOME}/bin/java -classpath $LOCALCLASSPATH org.apache.tools.ant.Main -Dant.home=$NEW_ANT_HOME -logger org.apache.tools.ant.NoBannerLogger -emacs $*