@@ -1,10 +1,6 @@
<?xml version="1.0"?>
<!-- ======================================================================= -->
<!-- Ant GUI build file -->
<!-- ======================================================================= -->
<project name="Antidote" default="compile" basedir=".">
<project name="Antidote" default="main" basedir=".">
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
@@ -14,20 +10,23 @@
<property name="name" value="antidote"/>
<property name="version" value="0.1"/>
<property name="ant.home" value="../../"/>
<property name="src.bin.dir" value="bin"/>
<property name="src.etc.dir" value="etc"/>
<property name="src.dir" value="."/>
<!-- XXX Yuck. Need to fix this with something better -->
<property name="build.dir" value="../../../build/antidote"/>
<property name="docs.dir" value="docs"/ >
<property name="build.dir" value="../../../build/ant"/>
<property name="lib.dir" value="${build.dir}/lib"/>
<property name="bin.dir" value="${build.dir}/bin"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.javadocs" value="${build.dir}/javadocs"/>
<property name="manifest" value="${src.dir}/etc/manifest"/>
<!-- XXX Yuck. Need to fix this with something better -->
<property name="ant.jar" value="${build.dir}/../ant/lib/ant.jar"/>
<property name="build.tests" value="${build.dir}/testcases"/>
<property name="ant.dist.dir" value="../../../dist/ant"/>
<path id="classpath">
</path>
<property name="packages" value="org.apache.tools.*"/>
<property name="packages" value="org.apache.tools.ant.gui. *"/>
<property name="manifest" value="etc/manifest"/>
<!-- =================================================================== -->
<!-- Set some the defaults the user can override in .ant.properties -->
@@ -36,6 +35,14 @@
<property name="build.compiler.emacs" value="on"/>
<property name="junit.fork" value="false" />
<!-- =================================================================== -->
<!-- Define a global set of patterns that can be referenced by -->
<!-- its id attribute -->
<!-- =================================================================== -->
<patternset id="chmod.patterns">
<include name="**/antidote" />
</patternset>
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
@@ -53,8 +60,8 @@
<javac srcdir="${src.dir}"
destdir="${build.classes}"
debug="on"
deprecation="on "
optimize="off " >
deprecation="off "
optimize="on " >
<classpath refid="classpath" />
</javac>
@@ -85,41 +92,100 @@
<jar jarfile="${lib.dir}/${name}.jar"
basedir="${build.classes}"
includes="org/**"
manifest="${manifest}"/>
manifest="${manifest}"
/>
</target>
<!-- =================================================================== -->
<!-- Creates the binary structure -->
<!-- =================================================================== -->
<target name="main" depends="jar" description="Creates the binary structure">
<mkdir dir="${bin.dir}"/>
<copy todir="${bin.dir}">
<fileset dir="${src.bin.dir}"/>
</copy>
<chmod perm="+x">
<fileset dir="${bin.dir}">
<patternset refid="chmod.patterns"/>
</fileset>
</chmod>
<fixcrlf srcdir="${bin.dir}" includes="antidote" cr="remove"/>
<fixcrlf srcdir="${bin.dir}" includes="*.bat" cr="add"/>
</target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadocs" depends="prepare"
description="Creates the API documentation">
<target name="javadocs" depends="prepare" description="Creates the API documentation">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="${packages}"
sourcepath="${basedir}/${src.dir}"
destdir="${build.javadocs}"
author="true"
private="true"
version="true"
windowtitle="${Name} API"
doctitle="${Name}"
bottom="Copyright © 2000 Apache Software Foundation. All Rights Reserved.">
<group title="Ant Gui" packages="org.apache.tools.ant.gui*" />
<group title="Antidote " packages="org.apache.tools.ant.gui*" />
</javadoc>
</target>
<!-- =================================================================== -->
<!-- Creates the distribution -->
<!-- =================================================================== -->
<target name="dist" depends="main,jar,javadocs" description="Creates the distribution">
<mkdir dir="${ant.dist.dir}"/>
<mkdir dir="${ant.dist.dir}/bin"/>
<mkdir dir="${ant.dist.dir}/lib"/>
<mkdir dir="${ant.dist.dir}/docs"/>
<mkdir dir="${ant.dist.dir}/docs/api"/>
<mkdir dir="${ant.dist.dir}/src"/>
<copy todir="${ant.dist.dir}/src">
<fileset dir="${src.dir}"/>
</copy>
<copy todir="${ant.dist.dir}/lib">
<fileset dir="${lib.dir}"/>
</copy>
<copy todir="${ant.dist.dir}/bin">
<fileset dir="bin"/>
</copy>
<copy todir="${ant.dist.dir}/docs">
<fileset dir="${docs.dir}"/>
</copy>
<copy todir="${ant.dist.dir}/docs/api">
<fileset dir="${build.javadocs}"/>
</copy>
<fixcrlf srcdir="${ant.dist.dir}/bin" includes="antidote" cr="remove"/>
<fixcrlf srcdir="${ant.dist.dir}/bin" includes="*.bat" cr="add"/>
<chmod perm="+x">
<fileset dir="${ant.dist.dir}/bin">
<patternset refid="chmod.patterns"/>
</fileset>
</chmod>
<copy file="README" tofile="${ant.dist.dir}/README"/>
<copy file="WHATSNEW" tofile="${ant.dist.dir}/WHATSNEW"/>
<copy file="TODO" tofile="${ant.dist.dir}/TODO"/>
<copy file="LICENSE" tofile="${ant.dist.dir}/LICENSE"/>
</target>
<!-- =================================================================== -->
<!-- Packages the distribution with ZIP -->
<!-- =================================================================== -->
<target name="dist-zip" depends="dist">
<zip zipfile="${Name}-${version}.zip" basedir="${ant.dist.dir}" includes="**"/>
</target>
<!-- =================================================================== -->
<!-- Run the GUI -->
<!-- Packages the distribution with TAR-GZIP -->
<!-- =================================================================== -->
<target name="run" depends="compile" description="Run Antidote">
<java classname="org.apache.tools.ant.gui.Main"
fork="yes"
dir="${user.home}">
<jvmarg value="-Djava.compiler=NONE"/>
<classpath>
<pathelement location="${build.classes}"/>
<pathelement location="${ant.jar}"/>
</classpath>
</java>
<target name="dist-tgz" depends="dist">
<tar tarfile="${Name}-${version}.tar" basedir="${ant.dist.dir}" includes="**"/>
<gzip zipfile="${Name}-${version}.tar.gz" src="${Name}-${version}.tar"/>
</target>
<!-- =================================================================== -->
@@ -127,7 +193,20 @@
<!-- =================================================================== -->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${ant.dist.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Total cleanup -->
<!-- =================================================================== -->
<target name="total-clean" depends="clean">
<delete dir="${bin.dir}"/>
<delete file="${lib.dir}/${name}.jar"/>
<delete file="${Name}-${version}.zip"/>
<delete file="${Name}-${version}.tar"/>
<delete file="${Name}-${version}.tar.gz"/>
</target>
</project>