<!-- Name: build.xml
     By:   Ian Brown
     Date: 06/18/2004

     Description:
         This file is the primary Ant build file for the RBNB example
         applications.
-->

<project name="APPLICATION.CHAT" default="library" basedir=".">

 <!-- Import the standard definitions (properties). -->
 <import file="../../definitions.xml" />

 <!-- Initialize by setting the timestamp. -->
 <target name="init">
  <tstamp />
  <buildnumber />
  <mkdir dir="${rbnb.builddir}" />
  <mkdir dir="${rbnb.classesdir}" />
  <mkdir dir="${rbnb.classesdir}/Applications" />
  <mkdir dir="${rbnb.classesdir}/Applications/Examples" />
  <mkdir dir="${rbnb.librarydir}" />
  <mkdir dir="${rbnb.librarydir}/Examples" />
 </target>

 <!-- Compile the Examples Java source code and place the results in the
      Examples classes directory.  References the Core library and the Examples
      classes for dependencies.
  -->
 <target name="compile" depends="init">
  <javac destdir="${rbnb.classesdir}/Applications/Examples"
         deprecation="on"
  	 source="${rbnb.javaver}"
  	 target="${rbnb.javaver}">
   <src path="${rbnb.sourcedir}/Applications/Examples" />
   <classpath path="${rbnb.classesdir}/Applications/Examples" />
   <classpath path="${rbnb.librarydir}/rbnb.jar" />
  </javac>
 </target>

 <!-- The library for the Examples includes the source code as well as the
      the class files.
  -->
 <target name="library" depends="compile">
  <copy todir="${rbnb.librarydir}/Examples">
   <fileset dir="${rbnb.classesdir}/Applications/Examples"
	    includes="**/*.class" />
   <fileset dir="${rbnb.sourcedir}/Applications/Examples"
	    includes="**/*" />
  </copy>
 </target>

 <!-- Cleans out all compiled files for the Examples project. -->
 <target name="clean">
  <delete dir="${rbnb.classesdir}/Applications/Examples" />
  <delete dir="${rbnb.librarydir}/Examples" />
 </target>

</project>

