<project name="OMNICLUSTERER" default="dist" basedir=".">
    <description>
        OMNICLUSTERER tool build file
    </description>
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="build" location="build"/>
  <property name="lib" location="lib"/>
  <property name="doc" location="doc"/>
  <property name="stylesheet" value="stylesheet.css"/>
  <property name="link" value="http://java.sun.com/j2se/1.4.1/docs/api"/>
  <property name="windowtitle" value="OMNICLUSTERER - API specification"/>
  <property name="compile.debug" value="true"/>
  <path id="compile.classpath">
     <pathelement location="${build}"/>
     <pathelement location="lib/Jama-1.0.1.jar"/>
  </path>


  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <mkdir dir="${build}"/>
    <mkdir dir="${doc}"/>
  </target>

  <target name="compile" depends="init"
        description="compile the source" >
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}" debug="${compile.debug}" source="1.4"
    classpathref="compile.classpath"/>
  </target>

  <target name="docs" depends="compile" description="generates documentation" >
    <javadoc sourcepath="${src}"
           defaultexcludes="yes"
           destdir="${doc}"
           version="true"
           use="true"
           public="true"
           windowtitle="OMNICLUSTERER API"
           packagenames="org.tcllab.clustering.*"
	   classpathref="compile.classpath"
	   source="1.4"
	   >
           <doctitle><![CDATA[<h1>OMNICLUSTERER API Specification</h1>]]></doctitle>
    </javadoc>
  </target>

  <target name="dist" depends="compile"
        description="generate the distribution" >
    <!-- Create the distribution directory -->
    <!-- Put everything in ${build} into the omniclusterer.jar file -->
    <jar jarfile="${lib}/omniclusterer.jar" basedir="${build}"/>
  </target>

  <target name="clean"
        description="clean up" >
    <delete>
      <fileset dir="${build}" includes="**/*.class"/>
    </delete>
    <delete file="${lib}/omniclusterer.jar"/>
  </target>
</project>
