Skip to content

Commit

Permalink
Work in almost all of Conors suggestions
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268507 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
realityforge committed Jan 23, 2001
1 parent 25ff952 commit 2ae6f2c
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 32 deletions.
2 changes: 1 addition & 1 deletion bootstrap.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo.
echo ... Building Ant Distribution

SET CLASSPATH=%LOCALCLASSPATH%;build\classes
call build.bat
call build.bat %1 %2 %3 %4 %5 %6 %7 %8

echo.
echo ... Done Bootstrapping Ant Distribution
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ if $cygwin; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi

${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main
${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main $*

echo ... Done Bootstrapping Ant Distribution
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if exist build\classes\org\apache\tools\ant\Main.class goto doBuild

bootstrap.bat
bootstrap.bat %1 %2 %3 %4 %5 %6 %7 %8

:doBuild

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

if test ! -f build\classes\org\apache\tools\ant\Main.class ; then
./bootstrap.sh
./bootstrap.sh $*
fi


Expand Down
153 changes: 125 additions & 28 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
Set the properties for source directories
===================================================================
-->
<property name="src.base" value="src"/>
<property name="manifest.dir" value="${src.base}/manifest"/>
<property name="java.dir" value="${src.base}/main"/>
<property name="script.dir" value="${src.base}/script"/>
<property name="src.dir" value="src"/>
<property name="manifest.dir" value="${src.dir}/manifest"/>
<property name="java.dir" value="${src.dir}/main"/>
<property name="script.dir" value="${src.dir}/script"/>
<property name="lib.dir" value="lib"/>

<!--
Expand All @@ -45,13 +45,7 @@
Set the properties related dist target
===================================================================
-->
<property name="dist.name" value="${Name}-${version}"/>
<!-- <property name="dist.dir" value="${dist.name}"/> -->
<property name="dist.dir" value="dist"/>
<property name="dist.bin" value="${dist.dir}/bin"/>
<property name="dist.lib" value="${dist.dir}/lib"/>
<property name="dist.docs" value="${dist.dir}/docs"/>
<property name="dist.javadocs" value="${dist.dir}/docs/api"/>
<property name="dist.name" value="jakarta-${name}-${version}"/>

<property name="java.dir" value="src/main"/>
<property name="docs.dir" value="docs"/>
Expand All @@ -76,9 +70,11 @@
<property name="packages" value="org.apache.tools.*"/>
<property name="manifest" value="src/etc/manifest"/>

<!-- =================================================================== -->
<!-- Set some the defaults the user can override in .ant.properties -->
<!-- =================================================================== -->
<!--
===================================================================
Set some the defaults the user can override in .ant.properties
===================================================================
-->
<property name="build.compiler.emacs" value="on"/>
<property name="build.compiler.warnings" value="true"/>
<property name="build.compiler.depend" value="true"/>
Expand All @@ -89,17 +85,38 @@
<property name="optimize" value="true" />
<property name="junit.fork" value="false" />

<!--
<!--
===================================================================
Main target
===================================================================
-->
<target name="main" depends="dist-lite" />

<!-- =================================================================== -->
<!-- Check to see what optional dependencies are available -->
<!-- =================================================================== -->
<target name="check_for_optional_packages">
<!--
===================================================================
Set up dist properties
===================================================================
-->
<target name="setup-properties">

<property name="dist.dir" value="dist"/>
<property name="dist.bin" value="${dist.dir}/bin"/>
<property name="dist.lib" value="${dist.dir}/lib"/>
<property name="dist.docs" value="${dist.dir}/docs"/>
<property name="dist.javadocs" value="${dist.dir}/docs/api"/>

<property name="src.dist.dir" value="dist-src"/>
<property name="src.dist.src" value="${src.dist.dir}/src"/>
<property name="src.dist.docs" value="${src.dist.dir}/docs"/>
<property name="src.dist.lib" value="${src.dist.dir}/lib"/>
</target>

<!--
===================================================================
Check to see what optional dependencies are available
===================================================================
-->
<target name="check_for_optional_packages" depends="setup-properties">
<available property="jdk1.2+" classname="java.lang.ThreadLocal" />
<available property="jdk1.3+" classname="java.lang.StrictMath" />
<available property="bsf.present"
Expand Down Expand Up @@ -274,9 +291,9 @@
</fileset>
</chmod>

<fixcrlf srcdir="${dist.dir}" cr="add" includes="**/*.bat" />
<fixcrlf srcdir="${dist.dir}" cr="remove" includes="**/*.sh" />
<fixcrlf srcdir="${dist.dir}" cr="remove" includes="ant" />
<fixcrlf srcdir="${dist.bin}" cr="add" includes="*.bat" />
<fixcrlf srcdir="${dist.bin}" cr="remove" includes="*.sh" />
<fixcrlf srcdir="${dist.bin}" cr="remove" includes="ant" />

</target>

Expand Down Expand Up @@ -310,7 +327,8 @@

<copy todir="${dist.lib}">
<fileset dir="${lib.dir}">
<include name="*" />
<include name="*.jar" />
<include name="*.zip" />
</fileset>
</copy>

Expand All @@ -335,12 +353,92 @@

<chmod dir="${dist.dir}" perm="go-rwx" />

<zip zipfile="${dist.name}.zip" basedir="${dist.dir}/.." includes="${dist.dir}/**"/>
<tar tarfile="${dist.name}.tar" basedir="${dist.dir}/.." includes="${dist.dir}/**"/>
<gzip zipfile="${dist.name}.tar.gz" src="${dist.name}.tar"/>
<delete file="${dist.name}.tar"/>
<zip zipfile="${dist.name}-bin.zip" basedir="${dist.dir}/.." includes="${dist.dir}/**"/>
<tar tarfile="${dist.name}-bin.tar" basedir="${dist.dir}/.." includes="${dist.dir}/**"/>
<gzip zipfile="${dist.name}-bin.tar.gz" src="${dist.name}-bin.tar"/>
<delete file="${dist.name}-bin.tar"/>
</target>

<!--
===================================================================
Create the source distribution
===================================================================
-->
<target name="src-dist" depends="setup-properties">

<mkdir dir="${src.dist.dir}" />
<!--
<mkdir dir="${src.dist.lib}" />
<mkdir dir="${src.dist.src}" />
<mkdir dir="${src.dist.docs}" />
-->
<copy todir="${src.dist.lib}">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="*.zip" />
</fileset>
</copy>

<copy todir="${src.dist.src}">
<fileset dir="${src.dir}"/>
</copy>

<copy todir="${src.dist.docs}">
<fileset dir="${docs.dir}"/>
</copy>

<copy todir="${src.dist.dir}">
<fileset dir=".">
<include name="README"/>
<include name="LICENSE"/>
<include name="TODO"/>
<include name="WHATSNEW"/>
<include name="build.bat"/>
<include name="build.sh"/>
<include name="bootstrap.bat"/>
<include name="bootstrap.sh"/>
</fileset>
</copy>

<fixcrlf srcdir="${src.dist.dir}" includes="*.sh" cr="remove"/>
<fixcrlf srcdir="${src.dist.dir}" includes="*.bat" cr="add"/>
<chmod perm="+x">
<fileset dir="${src.dist.dir}">
<include name="*.sh" />
</fileset>
</chmod>

<fixcrlf srcdir="${src.dist.src}" includes="**/*.java" cr="remove"/>

<zip zipfile="${dist.name}-src.zip"
basedir="${src.dist.dir}/.."
includes="${src.dist.dir}/**"/>
<!--
<tar tarfile="${dist.name}-src.tar"
basedir="${src.dist.dir}/.."
includes="${src.dist.dir}/**"/>
<gzip zipfile="${dist.name}-src.tar.gz" src="${dist.name}-src.tar"/>
<delete file="${dist.name}-src.tar"/>
-->
<delete dir="${src.dist.dir}" />
</target>

<!--
===================================================================
Completely build all dists
===================================================================
-->
<target name="full-dist">
<antcall target="src-dist">
<param name="src.dist.dir" value="${dist.name}" />
</antcall>

<antcall target="dist">
<param name="dist.dir" value="${dist.name}" />
</antcall>
<delete dir="${dist.name}" />
</target>

<!--
===================================================================
Cleans up build and distribution directories
Expand All @@ -360,7 +458,6 @@
===================================================================
-->
<target name="real-clean" depends="clean">
<delete dir="${docs.dir}" />
<delete file="${dist.name}.tar.gz" />
<delete file="${dist.name}.zip" />
</target>
Expand Down

0 comments on commit 2ae6f2c

Please sign in to comment.