summaryrefslogtreecommitdiffstats
path: root/build.xml
blob: 2d1ba1c8dd7e4200d05271fe065aba3594f962ab (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0"?>

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

  <property name="src.dir"       location="src"/>
  <property name="build.dir"     location="build"/>
  <property name="gen.dir"       location="${build.dir}/gen"/>
  <property name="class.dir"     location="${build.dir}/classes"/>
  <property name="javadoc.dir"   location="${build.dir}/javadoc"/>

  <property name="version_base"             value="1.6.0"/>
  <property name="build.spec.title"         value="3D Vector Math Package"/>
  <property name="build.spec.vendor"        value=""/>
  <property name="build.impl.title"         value="3D Vector Math Package"/>
  <property name="build.impl.vendor"        value=""/>
  <property name="build.impl.vendor.id"     value=""/>

  <target name="clean">
    <delete dir="${build.dir}"/>
  </target>

  <target name="gen">
    <mkdir dir="${gen.dir}"/>
    <copy todir="${gen.dir}"  overwrite="true">
      <fileset dir="${src.dir}" includes="VECMATH.MF"/>
      <filterset>
        <filter token="VERSION_BASE"    value="${version_base}"/>
        <filter token="SPEC_TITLE"      value="${build.spec.title}"/>
        <filter token="SPEC_VENDOR"     value="${build.spec.vendor}"/>
        <filter token="IMPL_TITLE"      value="${build.impl.title}"/>
        <filter token="IMPL_VENDOR"     value="${build.impl.vendor}"/>
        <filter token="IMPL_VENDOR_ID"  value="${build.impl.vendor.id}"/>
      </filterset>
    </copy>

    <copy todir="${class.dir}/javax">
      <fileset dir="." includes="COPYRIGHT.txt"/>
      <fileset dir="." includes="LICENSE.txt"/>
    </copy>
  </target>

  <target name="compile" depends="gen">
    <mkdir dir="${class.dir}"/>

    <javac srcdir="${src.dir}"  destdir="${class.dir}"
           source="1.5"   target="1.5"
           debug="true"
           debuglevel="lines,source"
           deprecation="on"
           includeantruntime="false"
    />

    <copy todir="${class.dir}">
      <fileset dir="${src.dir}" includes="**/*.properties"/>
    </copy>
  </target>

  <target name="jar" depends="compile">
    <jar jarfile="${build.dir}/jars/vecmath.jar"  manifest="${gen.dir}/VECMATH.MF"
         compress="false" update="yes">
      <fileset dir="${class.dir}"/>
    </jar>

    <zip destfile="${build.dir}/jars/vecmath-src.zip">
      <fileset dir="${src.dir}" includes="**/*.java"/>
      <fileset dir="." includes="COPYRIGHT.txt"/>
      <fileset dir="." includes="LICENSE.txt"/>
    </zip>

  </target>

  <target name="docs" depends="gen">
    <mkdir dir="${javadoc.dir}"/>

    <javadoc sourcepath="${src.dir}"
	     packagenames="javax.vecmath.*"
             destdir="${javadoc.dir}"
             windowtitle="Vecmath ${version_base}">
    </javadoc>
  </target>

</project>