aboutsummaryrefslogtreecommitdiff
path: root/contrib/retep/build.xml
blob: 78b45e3bf45e40230de9271d5bd80eafbb82332b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!--

  build file to build the donated retep tools packages

  $Id: build.xml,v 1.3 2001/03/05 09:15:35 peter Exp $

-->

<project name="retep" default="jar" basedir=".">

  <!-- set global properties for this build -->
  <property name="src"     value="." />
  <property name="dest"    value="build" />
  <property name="package" value="uk/org/retep" />
  <property name="jars"    value="jars" />

  <!-- Some checks used to build dependent on the environment -->
  <target name="checks">
    <available property="jdk1.2+" classname="java.lang.ThreadLocal" />
    <available property="jdk1.3+" classname="java.lang.StrictMath" />
    <available property="jdk1.2e+" classname="javax.sql.DataSource" />
    <available property="xml" classname="org.xml.sax.Parser" />
  </target>

  <!-- Prepares the build by creating a directory to place the class files -->
  <target name="prepare">
    <mkdir dir="${dest}" />
    <mkdir dir="${jars}" />
  </target>

  <!-- This target removes any class files from the build directory -->
  <target name="clean">
    <delete dir="${dest}" />
    <delete dir="${jars}" />
  </target>

  <!-- Builds the XML Tools -->
  <target name="compile" depends="checks,prepare">
    <javac srcdir="${src}" destdir="${dest}">
      <include name="${package}/**" />
    </javac>
  </target>

  <!-- Builds the various jar files -->
  <target name="jar" depends="compile">
    <jar jarfile="${jars}/retepTools.jar" basedir="${dest}">
      <include name="${package}/**" />
    </jar>
  </target>

  <target name="install" depends="jar" if="install.directory">
    <copy todir="${install.directory}" overwrite="true" filtering="off">
      <fileset dir="${jars}">
        <include name="**/*.jar" />
      </fileset>
    </copy>
  </target>

</project>