<?xml version="1.0"?>

<!-- ================================================================ -->
<!--                                                                  -->
<!-- Execute Query Ant build script                                   -->
<!-- Date:  17 September 2006                                         -->
<!-- Build: 5053                                                      -->
<!--                                                                  -->
<!-- ================================================================ -->

<project name="ExecuteQuery" default="make" basedir=".">

   <!--Set the output directories-->
   <property name="compile.outdir" value="classes"/>
   <property name="src.path" value="src"/>
   <property name="dist.outdir" value="build"/>
   <property name="lib.dir" value="${dist.outdir}/lib"/>

   <!--Set the classpath-->
   <path id="classpath">
      <pathelement location="${lib.dir}"/>
      <fileset dir="${lib.dir}">
         <include name="*.jar"/>
      </fileset>
   </path>

   <!--Set the source path-->
   <path id="srcpath">
      <pathelement location="${src.path}/java"/>
   </path>

   <target name="init" description="Create required directories">
      <tstamp/>
      <mkdir dir="${compile.outdir}"/>
      <mkdir dir="${dist.outdir}"/>

      <copy todir="${compile.outdir}">
          <fileset dir="${src.path}/java" excludes="**/*.java"/>
      </copy>

      <copy todir="${dist.outdir}">
         <fileset dir="${src.path}" excludes="java/"/>
      </copy>

   </target>

   <target name="compile" depends="init">

      <!--Compile Java source files-->
      <javac destdir="${compile.outdir}" debug="on">
         <classpath refid="classpath"/>
         <src refid="srcpath"/>
         <include name="org/**"/>
      </javac>

   </target>
  
   <target name="make" depends="clean">
   </target>

   <target name="jar" depends="compile" description="generate the jar file">
      <jar jarfile="${dist.outdir}/eq.jar" 
           manifest="eq.manifest" 
           basedir="${compile.outdir}"
           compress="false"
           includes="org/**"/>
   </target>

   <target name="clean" depends="jar">
      <delete dir="${compile.outdir}"/>
   </target>
   
   <target name="all" depends="compile,jar"/>

</project>
