<project name="JsUnit" default="test" basedir=".">
  <property name="src" location="results/src"/>
  <property name="bin" location="results/bin"/>
  <property name="lib"  location="results/lib"/>
  <property name="debug" value="yes"/>
  
  <target name="compile" description="Compile the source">
    <delete dir="${bin}/net" />
    <javac srcdir="${src}" destdir="${bin}" debug="${debug}" target="1.1">
      <classpath>
        <fileset dir="${lib}">
          <include name="*.jar"/> 
        </fileset>
      </classpath>
    </javac>	
  </target>

  <target name="dist" depends="compile" description="Generate the distribution" >
    <delete file="${bin}/jsunit.jar" />  
    <jar jarfile="${bin}/jsunit.jar" basedir="${bin}"/>
    <delete dir="${bin}/net" />
  </target>
  <target name="test" depends="dist" description="Runs the JUnit tests for JsUnit">
    <java classname="junit.textui.TestRunner">
      <classpath>
        <fileset dir="${lib}">
          <include name="*.jar"/> 
        </fileset>
        <fileset dir="${bin}">
          <include name="jsunit.jar"/> 
        </fileset>
      </classpath>
      <arg value="net.jsunit.test.Suite" /> 
    </java>
  </target>
</project>

