Browse Source

Further tuning of the build scripts. The bootstrap now goes into

the bootstrap directory to minimise interference with the CVS lib
directory.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268545 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
8a40113487
7 changed files with 59 additions and 40 deletions
  1. +2
    -0
      .cvsignore
  2. +2
    -2
      bootstrap.bat
  3. +8
    -4
      build.bat
  4. +2
    -2
      build.sh
  5. +45
    -22
      build.xml
  6. +0
    -9
      src/script/ant
  7. +0
    -1
      src/script/ant.bat

+ 2
- 0
.cvsignore View File

@@ -1,6 +1,8 @@
.ant.properties
dist
build
bootstrap
distribution
prj.el
emacs-jprj.el
bootstrap.bat.pif


+ 2
- 2
bootstrap.bat View File

@@ -39,8 +39,8 @@ echo CLASSPATH=%CLASSPATH%
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


+ 8
- 4
build.bat View File

@@ -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=

+ 2
- 2
build.sh View File

@@ -4,7 +4,7 @@ REALANTHOME=$ANT_HOME
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 @@ if [ "$REALANTHOME" != "" ] ; then
ANT_INSTALL="-Dant.install=$REALANTHOME"
fi

bin/ant $ANT_INSTALL $*
bootstrap/bin/ant $ANT_INSTALL $*


+ 45
- 22
build.xml View File

@@ -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,12 +413,13 @@

<!--
===================================================================
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>
@@ -419,7 +427,17 @@

<!--
===================================================================
Installs ant
Cleans everything
===================================================================
-->
<target name="allclean" depends="clean">
<delete file="${bootstrap.dir}/bin/antRun" />
<delete file="${bootstrap.dir}/bin/antRun.bat" />
</target>

<!--
===================================================================
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>

+ 0
- 9
src/script/ant View File

@@ -68,15 +68,6 @@ do
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


+ 0
- 1
src/script/ant.bat View File

@@ -57,7 +57,6 @@ goto end
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


Loading…
Cancel
Save