<?xml version="1.0"?>
<!-- REBUILD.XML simple bio build that presumes all files are already in the project directory. -->
<!-- Build with ant -f rebuild.xml zip jet -->
<!-- Compile and jar bio using ANT -->
<!-- Invoke with [ant clean] to erase class files and start over. -->
<!-- Invoke with [ant compile] to just compile. -->
<!-- Invoke with [ant javadoc] to generate javadoc. -->
<!-- Invoke with [ant jar] to compile and create jar files. -->
<!-- Invoke with [ant jet] to create JET executables. -->
<!-- Invoke with [ant zip] to create source code zip files. -->
<!-- For details of ANT use, see http://mindprod.com/jgloss/ant.html -->

<!-- D E F I N I T I O N S -->
<!-- ANT.project.dir is com/mindprod/bio -->
<!-- basedir is E:/ -->
<project name="bio" basedir="E:/" default="jar">

<!-- extensions for zip. Case sensitive! -->
<property name="distributed.exts" value="**/*.au,**/*.asm,**/*.bat,**/*.btm,**/*.c,**/*.class,**/*.cpp,**/*.css,**/*.csv,**/*.dll,**/*.gif,**/*.h,**/*.hpp,**/*.htm,**/*.html,**/*.ico,**/*.ION,**/*.ion,**/*.jar,**/*.java,**/*.jnlp,**/*.jpg,**/*.look,**/*.png,**/*.properties,**/*.ser,**/*.sln,**/*.txt,**/*.use,**/*.vcproj,**/*.xml" />

<!-- dirs we to exclude from zip. Case sensitive! -->
<property name="nondistributed" value="**/jetpdb/**,**/Debug/**,**/Release/**" />

<!-- C L E A N -->
<target name="clean">
<echo message=":::    bio    ::: deleting files to force regeneration" />
  <delete>
    <fileset dir="com/mindprod/bio" includes="**/*.class" />
    <fileset dir="com/mindprod/bio" includes="**/*.jar" />
    <fileset dir="com/mindprod/bio" includes="bio26.zip" />
  </delete>
</target>

<!-- C O M P I L E -->
<target name="compile">
<echo message=":::    bio    ::: compiling tree." />
  <javac source="1.3" target="1.1" srcdir="com/mindprod/bio" sourcepath="${basedir}" debug="on">
    <compilerarg value="-Xlint:deprecation" />
  </javac>
</target>

<!-- J A V A H -->
<target name="javah" depends="compile">
  <!-- nothing to do -->
</target>

<!-- G A T H E R -->
<target name="gather" depends="compile">
<!-- nothing to do -->
</target>

<!-- J A R -->
<!-- Make apache-ant-1.7.1\lib\GenJar.jar known to ANT -->
<!-- See http://mindprod.com/jgloss/genjar.html for details -->
<taskdef resource="genjar.properties" />

<target name="jar" depends="gather">
 <echo message=":::    bio    ::: genjar finding dependencies and creating jar." />
  <genjar jarfile="com/mindprod/bio/bio.jar">
    <!-- include main class and all its dependencies -->
    <class name="com.mindprod.bio.Bio" />
    <!-- Extra classes and properties to include in bio.jar -->
    <!-- Spell out each extra file individually to be included in the jar -->
    <resource file="com/mindprod/bio/adano.jpg" package="com.mindprod.bio" />
    <resource file="com/mindprod/bio/lclogo.jpg" package="com.mindprod.bio" />

    <!-- define the manifest -->
    <manifest>
      <attribute name="Main-Class" value="com.mindprod.bio.Bio" />
    </manifest>
  </genjar>
</target>

<!-- P O S T J A R -->
<target name="postjar" depends="jar">
  <!-- nothing to do -->
</target>

<!-- P R E J E T -->
<target name="prejet">
<echo message=":::    bio    ::: avoid regenerating Jet executable if already done" />
  <uptodate property="jet.uptodate" srcfile="com/mindprod/bio/bio.jar" targetfile="com/mindprod/bio/bio.exe" />
</target>

<!-- J E T -->
<!-- Requires Excelsior JET native Java compiler jc.exe on the path -->
<!-- See http://mindprod.com/jgloss/jet.html for details -->
<target name="jet" depends="prejet" unless="jet.uptodate">
<echo message=":::    bio    ::: jet compiling." />
  <exec executable="jc.exe" dir="com/mindprod/bio">
    <arg value="-DECOR=" />
    <arg value="bio.jar" />
  </exec>
</target>

<!-- P R E J A V A D O C . -->
<target name="prejavadoc">
<echo message=":::    bio    ::: avoid regenerating Javadoc if already done" />
  <uptodate property="javadoc.uptodate" targetfile="com/mindprod/bio/javadoc/index.html">
    <srcfiles dir="com/mindprod/bio" includes="**/*.java" />
  </uptodate>
</target>

<!-- J A V A D O C -->
<target name="javadoc" depends="prejavadoc" unless="javadoc.uptodate">
<echo message=":::    bio    ::: generating Javadoc" />
  <!-- prepare javadoc -->
  <javadoc
    author="true"
    destdir="com/mindprod/bio/javadoc"
    packagenames="com.mindprod.bio.*"
    sourcepath="E:/"
    use="true"
    version="true" />
</target>

<!-- Z I P -->
<target name="zip" depends="javadoc,jar">
<echo message=":::    bio    ::: preparing zip distributable" />
  <!-- Remove references to separate foot files. -->
  <exec executable="prunefoot.exe" failifexecutionfails="false" dir="com/mindprod/bio">
    <arg value="bio.html" />
    <arg value="bio.manual.html" />
  </exec>
  <zip destfile="com/mindprod/bio/bio26.zip" duplicate="preserve" filesonly="true" includes="${distributed.exts}" excludes="${nondistributed}">
    <!-- zipfileset includes all subdirs as well -->
    <zipfileset dir="com/mindprod/bio" prefix="com/mindprod/bio" includes="${distributed.exts}" excludes="${nondistributed}" />
    <zipfileset dir="com/mindprod/common11" prefix="com/mindprod/common11" includes="${distributed.exts}" excludes="${nondistributed}" />
    <zipfileset dir="com/mindprod/ledatastream" prefix="com/mindprod/ledatastream" includes="${distributed.exts}" excludes="${nondistributed}" />
  </zip>
</target>

<!-- P O S T Z I P -->
<target name="postzip" depends="zip,postjar">
  <!-- nothing to do -->
</target>
</project>