conor 01/01/31 01:42:05
Modified: . .cvsignore bootstrap.bat build.sh build.xml
build.bat
src/script ant ant.bat
Log:
Further tuning of the build scripts. The bootstrap now goes into
the bootstrap directory to minimise interference with the CVS lib
directory.
Revision Changes Path
1.5 +2 -0 jakarta-ant/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/jakarta-ant/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 2001/01/23 05:10:32 1.4
+++ .cvsignore 2001/01/31 09:42:04 1.5
@@ -1,6 +1,8 @@
.ant.properties
dist
build
+bootstrap
+distribution
prj.el
emacs-jprj.el
bootstrap.bat.pif
1.28 +2 -2 jakarta-ant/bootstrap.bat
Index: bootstrap.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/bootstrap.bat,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- bootstrap.bat 2001/01/30 15:08:27 1.27
+++ bootstrap.bat 2001/01/31 09:42:04 1.28
@@ -39,8 +39,8 @@
if "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
-mkdir %CLASSDIR%
-mkdir build
+if not exist %CLASSDIR% mkdir %CLASSDIR%
+if not exist build mkdir build
echo.
echo ... Compiling Ant Classes
1.18 +2 -2 jakarta-ant/build.sh
Index: build.sh
===================================================================
RCS file: /home/cvs/jakarta-ant/build.sh,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- build.sh 2001/01/31 06:15:02 1.17
+++ build.sh 2001/01/31 09:42:04 1.18
@@ -4,7 +4,7 @@
ANT_HOME=.
export ANT_HOME
-if test ! -f lib/ant.jar -o ! -x bin/ant -o ! -x bin/antRun ; then
+if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x
bootstrap/bin/antRun ; then
/bin/sh ./bootstrap.sh
fi
@@ -12,5 +12,5 @@
ANT_INSTALL="-Dant.install=$REALANTHOME"
fi
-bin/ant $ANT_INSTALL $*
+bootstrap/bin/ant $ANT_INSTALL $*
1.124 +45 -22 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- build.xml 2001/01/31 06:15:03 1.123
+++ build.xml 2001/01/31 09:42:04 1.124
@@ -2,7 +2,7 @@
<!--
=======================================================================
- Ant own build file
+ Ant own build file
=======================================================================
-->
<project name="Ant" default="main" basedir=".">
@@ -23,7 +23,7 @@
<!--
===================================================================
- Set the properties related to the source tree
+ Set the properties related to the source tree
===================================================================
-->
<property name="src.dir" value="src"/>
@@ -41,10 +41,11 @@
<!--
===================================================================
- Set the properties for the build area
+ Set the properties for the build area
===================================================================
-->
<property name="build.dir" value="build"/>
+ <property name="bootstrap.dir" value="bootstrap"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.lib" value="${build.dir}/lib"/>
<property name="build.javadocs" value="${build.dir}/javadocs"/>
@@ -61,7 +62,7 @@
<!--
===================================================================
- Set up properties for the distribution area
+ Set up properties for the distribution area
===================================================================
-->
<property name="dist.name" value="jakarta-${name}-${version}"/>
@@ -83,7 +84,7 @@
<!--
===================================================================
- Check to see what optional dependencies are available
+ Check to see what optional dependencies are available
===================================================================
-->
<target name="check_for_optional_packages">
@@ -142,13 +143,20 @@
classpathref="classpath"/>
</target>
- <!-- ===================================================================
-->
- <!-- Prepares the build directory
-->
- <!-- ===================================================================
-->
+ <!--
+ ===================================================================
+ Prepare the build
+ ===================================================================
+ -->
<target name="prepare">
<tstamp />
</target>
+ <!--
+ ===================================================================
+ Build the code
+ ===================================================================
+ -->
<target name="build" depends="prepare, check_for_optional_packages">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes}"/>
@@ -207,8 +215,7 @@
<!--
===================================================================
- Creates the lib directory including the ant jars, ant.jar and
- optional.jar
+ Create the ant jars: ant.jar and optional.jar
===================================================================
-->
<target name="jars" depends="build">
@@ -229,7 +236,7 @@
<!--
===================================================================
- Create the essential distribution
+ Create the essential distribution that can run ant
===================================================================
-->
<target name="dist-lite" depends="jars, setup-distproperties">
@@ -261,7 +268,7 @@
<!--
===================================================================
- Create the complete distribution
+ Create the complete distribution
===================================================================
-->
<target name="dist" depends="dist-lite,javadocs">
@@ -301,19 +308,19 @@
<!--
===================================================================
- Target to create bootstrap libraries
+ Target to create bootstrap build
===================================================================
-->
<target name="bootstrap">
<antcall target="dist-lite">
- <param name="dist.dir" value="." />
+ <param name="dist.dir" value="${bootstrap.dir}" />
</antcall>
</target>
<!--
===================================================================
- Create the source distribution
+ Create the source distribution
===================================================================
-->
<target name="src-dist" depends="setup-distproperties">
@@ -363,7 +370,7 @@
<!--
===================================================================
- Create the binary distribution
+ Create the binary distribution
===================================================================
-->
<target name="distribution">
@@ -406,20 +413,31 @@
<!--
===================================================================
- Cleans up build and distribution directories
+ Cleans up build and distribution directories
===================================================================
-->
- <target name="clean">
+ <target name="clean" depends="setup-distproperties">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
+ <delete dir="${dist.base}" />
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no"/>
</delete>
</target>
<!--
+ ===================================================================
+ Cleans everything
+ ===================================================================
+ -->
+ <target name="allclean" depends="clean">
+ <delete file="${bootstrap.dir}/bin/antRun" />
+ <delete file="${bootstrap.dir}/bin/antRun.bat" />
+ </target>
+
+ <!--
===================================================================
- Installs ant
+ Installs ant
===================================================================
-->
<target name="install" if="ant.install">
@@ -436,7 +454,7 @@
<!--
===================================================================
- Creates the API documentation
+ Creates the API documentation
===================================================================
-->
@@ -466,7 +484,7 @@
<!--
===================================================================
- Compile testcases
+ Compile testcases
===================================================================
-->
<target name="compile-tests" depends="build" if="junit.present">
@@ -489,7 +507,7 @@
<!--
===================================================================
- Run testcase
+ Run testcase
===================================================================
-->
<target name="run-tests" depends="compile-tests" if="junit.present">
@@ -548,6 +566,11 @@
</junit>
</target>
+ <!--
+ ===================================================================
+ Main target - runs dist-lite by default
+ ===================================================================
+ -->
<target name="main" depends="dist-lite"/>
</project>
1.23 +8 -4 jakarta-ant/build.bat
Index: build.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/build.bat,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- build.bat 2001/01/30 15:08:26 1.22
+++ build.bat 2001/01/31 09:42:04 1.23
@@ -1,19 +1,23 @@
@echo off
+set OLDCLASSPATH=%CLASSPATH%
set REAL_ANT_HOME=%ANT_HOME%
-set ANT_HOME=.
-if exist lib\ant.jar if exist bin\ant.bat if exist bin\lcp.bat if exist
bin\antRun.bat goto runAnt
+set ANT_HOME=bootstrap
+if exist bootstrap\lib\ant.jar if exist bootstrap\bin\ant.bat if exist
bootstrap\bin\lcp.bat if exist bootstrap\bin\antRun.bat goto runAnt
call bootstrap.bat
:runAnt
+set CLASSPATH=%CLASSPATH%;lib\parser.jar;lib\jaxp.jar
if not "%REAL_ANT_HOME%" == "" goto install_ant
-call .\bin\ant.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
+call bootstrap\bin\ant.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
:install_ant
-call .\bin\ant.bat -Dant.install="%REAL_ANT_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
+call bootstrap\bin\ant.bat -Dant.install="%REAL_ANT_HOME%" %1 %2 %3 %4 %5 %6
%7 %8 %9
rem clean up
:cleanup
set ANT_HOME=%REAL_ANT_HOME%
set REAL_ANT_HOME=
+set CLASSPATH=%OLDCLASSPATH%
+set OLDCLASSPATH=
1.3 +0 -9 jakarta-ant/src/script/ant
Index: ant
===================================================================
RCS file: /home/cvs/jakarta-ant/src/script/ant,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ant 2001/01/30 09:00:57 1.2
+++ ant 2001/01/31 09:42:04 1.3
@@ -68,15 +68,6 @@
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
LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
1.4 +0 -1 jakarta-ant/src/script/ant.bat
Index: ant.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/src/script/ant.bat,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ant.bat 2001/01/29 01:13:56 1.3
+++ ant.bat 2001/01/31 09:42:04 1.4
@@ -57,7 +57,6 @@
set _JAVACMD=%JAVACMD%
set LOCALCLASSPATH="%CLASSPATH%"
for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
-for %%i in ("%ANT_HOME%\lib\core\*.jar") do call "%ANT_HOME%\bin\lcp.bat"
"%%i"
if "%JAVA_HOME%" == "" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java