<project name="junit-proposal" basedir="." default="compile">
  <property file=".ant.properties"/>
  <property file="${user.home}/.ant.properties"/>
  
  <!--property name="build.sysclasspath" value="ignore"/-->
  <property name="build.compiler" value="jikes"/>
  <!--property name="build.compiler.emacs" value="on"/-->
  <property name="build.compiler.pedantic" value="true"/>
  <property name="build.compiler.depend" value="true"/>
  <property name="build.compiler.fulldepend" value="true"/>

  <property name="debug" value="on"/>
  <property name="optimize" value="off"/>
  <property name="deprecation" value="on"/>

  <property name="build.dir" value="build"/>
  <property name="build.lib" value="${build.dir}/lib"/>
  <property name="build.src" value="${build.dir}/src"/>
  <property name="build.classes" value="${build.dir}/classes"/>
  
  <property name="testcases.classes" value="${build.dir}/testcases"/>

  <property name="java.dir" value="src/java"/>
  <property name="tests.dir" value="src/testcases"/>
  <property name="ant.base.dir" location="../../.."/>
  <property name="ant.lib.dir" location="${ant.base.dir}/lib"/>
  <property name="lib.dir" location="lib"/>
  <property name="bootstrap.dir" location="${ant.base.dir}/bootstrap"/>
  
  <path id="project.class.path">
    <pathelement path="${build.classes}" />
    <fileset dir="${ant.lib.dir}" includes="**/*.jar"/>
    <fileset dir="${bootstrap.dir}/lib" includes="ant.jar"/>
    <fileset dir="${lib.dir}" includes="**/*.jar"/>
  </path>


  <target name="compile"
          description="--> compile the source code">
    <mkdir dir="${build.classes}"/>
    <javac srcdir="src/main"
           destdir="${build.classes}"
           debug="${debug}"
           optimize="${optimize}"
           deprecation="${deprecation}"
           includeantruntime="no">
      <classpath refid="project.class.path"/>
    </javac>
    <antcall target="compile-tests"/>
  </target>
  

  <target name="clean"
          description="--> cleans up build and dist directories">
    <delete dir="${build.dir}" />
    <delete>
      <fileset dir="." includes="**/*.bak" defaultexcludes="no"/>
    </delete>
  </target>

  <target name="compile-tests">
    <mkdir dir="${testcases.classes}"/>
    <javac srcdir="src/testcases"
           destdir="${testcases.classes}"
           debug="${debug}"
           optimize="${optimize}"
           deprecation="${deprecation}"
           includeantruntime="no">
      <classpath refid="project.class.path"/>
    </javac>
  </target>
  
  <target name="run-ant-tests" depends="compile">
     <!--ant dir="${ant.base.dir}" target="build" inheritall="false"/>
     <ant dir="${ant.base.dir}" target="compile-tests" inheritall="false"/-->
     <ant antfile="rjunit-ant-tests.xml"/>
  </target>
  
</project>