diff --git a/bootstrap.sh b/bootstrap.sh
index 03ca3adfb..f9e3c1191 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -2,6 +2,8 @@
# You will need to specify JAVA_HOME if compiling with 1.2 or later.
+unset CLASSPATH
+
if [ "$JAVA_HOME" != "" ] ; then
if [ -f $JAVA_HOME/lib/tools.jar ] ; then
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
@@ -59,6 +61,7 @@ fi
export CLASSPATH
mkdir -p ${CLASSDIR}
+mkdir -p build
echo ... Compiling Ant Classes
@@ -77,8 +80,10 @@ cp src/main/org/apache/tools/ant/types/defaults.properties \
echo ... Building Ant Distribution
+cp -r ${CLASSDIR} build
+
${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main \
- -buildfile build.xml clean main bootstrap
+ -buildfile build.xml bootstrap
echo ... Cleaning Up Build Directories
diff --git a/build.sh b/build.sh
index fc1828b6d..847cbaf2f 100755
--- a/build.sh
+++ b/build.sh
@@ -5,11 +5,11 @@ ANT_HOME=.
export ANT_HOME
if test ! -f lib/ant.jar -o ! -x bin/ant -o ! -x bin/antRun ; then
- ./bootstrap.sh
+ /bin/sh ./bootstrap.sh
fi
if [ "$REALANTHOME" != "" ] ; then
- ANT_INSTALL="-Dant.install $REALANTHOME"
+ ANT_INSTALL="-Dant.install=$REALANTHOME"
fi
bin/ant $ANT_INSTALL $*
diff --git a/build.xml b/build.xml
index c966d6f0c..b138a09e1 100644
--- a/build.xml
+++ b/build.xml
@@ -345,6 +345,7 @@
+