summaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-06-15 13:42:55 -0700
committerHarvey Harrison <[email protected]>2013-06-15 13:42:55 -0700
commit504648696d6099f292105027da2a49f185a9b31a (patch)
tree2d90c17e485fd4159c4a14bf9aebd8a7143c9b91 /build.xml
parenta4702472df54f57eae91bc29c1d59c7fc05a495c (diff)
vecmath: replace the old ant build script, everything should be in the new one now
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml277
1 files changed, 50 insertions, 227 deletions
diff --git a/build.xml b/build.xml
index 84c402d..2d1ba1c 100644
--- a/build.xml
+++ b/build.xml
@@ -1,259 +1,82 @@
<?xml version="1.0"?>
-<!--
-/*
- * $RCSfile$
- *
- * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * $Revision$
- * $Date$
- * $State$
- */
- -->
+<project name="vecmath" basedir="." default="jar">
-<project name="vecmath-1.6.0" default="jar-debug" basedir=".">
+ <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"/>
- <!-- *************************************** -->
- <!-- *** Begin build-specific properties *** -->
- <!-- *************************************** -->
+ <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=""/>
- <!--
- * The following properties specify the current version of 3D.
- * The "version_base" property specifies the dot-dot base version
- * number of 3D; it must contain exactly three integer numbers
- * separated by "periods ("."). It should match the version base
- * defined in the j3d-core build.xml file.
- -->
- <property name="version_base" value="1.6.0"/>
-
- <!-- ************************************* -->
- <!-- *** End build-specific properties *** -->
- <!-- ************************************* -->
-
-
- <!-- Set global properties for this build -->
- <property name="src" location="src"/>
- <property name="build" location="build"/>
- <property name="dist" location="dist"/>
- <property name="version" value="1_6_0"/>
- <property name="docname" value="vecmath-${version}-doc"/>
-
- <property name="build.spec.title" value="3D Vector Math Package"/>
- <property name="build.impl.title" value="3D Vector Math Package"/>
- <property name="build.spec.vendor" value=""/>
- <property name="build.impl.vendor" value=""/>
- <property name="build.impl.vendor.id" value=""/>
-
- <target name="echo">
- <echo message="user.name = ${user.name}"/>
- <echo message="user.home = ${user.home}"/>
- <echo message="java.home = ${java.home}"/>
- <echo message="ant.home = ${ant.home}"/>
- <echo message="O/S arch is ${os.arch}"/>
- <echo message="O/S name is ${os.name}"/>
- </target>
-
-
- <target name="init">
- <!-- Create the time stamp -->
- <tstamp>
- <format property="buildtime"
- pattern="yyyy-MM-dd'T'HH:mm:ss"/>
- </tstamp>
-
- <!-- Create the base build directory -->
- <mkdir dir="${build}"/>
+ <target name="clean">
+ <delete dir="${build.dir}"/>
</target>
- <target name="compile-debug" depends="init">
-
- <!-- Create the debug build directory structure used for compile -->
- <mkdir dir="${build}/debug/classes"/>
- <mkdir dir="${build}/debug/gen"/>
-
- <!-- Compile the java code from ${src} into ${build}/debug/classes -->
- <javac srcdir="${src}"
- destdir="${build}/debug/classes"
- source="1.5"
- target="1.5"
- debug="true"
- deprecation="on"
- />
+ <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 the I18N property files while retaining package location -->
- <copy todir="${build}/debug/classes">
- <fileset dir="${src}" includes="**/*.properties"/>
+ <copy todir="${class.dir}/javax">
+ <fileset dir="." includes="COPYRIGHT.txt"/>
+ <fileset dir="." includes="LICENSE.txt"/>
</copy>
</target>
- <target name="compile-opt" depends="init">
-
- <!-- Create the opt build directory structure used for compile -->
- <mkdir dir="${build}/opt/classes"/>
- <mkdir dir="${build}/opt/gen"/>
+ <target name="compile" depends="gen">
+ <mkdir dir="${class.dir}"/>
- <!-- Compile the java code from ${src} into ${build}/opt/classes -->
- <javac srcdir="${src}"
- destdir="${build}/opt/classes"
- source="1.5"
- target="1.5"
+ <javac srcdir="${src.dir}" destdir="${class.dir}"
+ source="1.5" target="1.5"
debug="true"
debuglevel="lines,source"
deprecation="on"
+ includeantruntime="false"
/>
- <!-- Copy the I18N property files while retaining package location -->
- <copy todir="${build}/opt/classes">
- <fileset dir="${src}" includes="**/*.properties"/>
+ <copy todir="${class.dir}">
+ <fileset dir="${src.dir}" includes="**/*.properties"/>
</copy>
</target>
- <target name="compile" depends="compile-opt,compile-debug"/>
-
- <target name="jar-debug" depends="compile-debug">
- <!-- Create the jar directory -->
- <mkdir dir="${build}/debug/lib/ext"/>
-
- <copy todir="${build}/debug/gen"
- overwrite="true">
- <fileset dir="${src}" 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 the copyright file and all license files -->
- <copy todir="${build}/debug/classes/javax">
- <fileset dir="." includes="COPYRIGHT.txt"/>
- <fileset dir="." includes="*LICENSE*.txt"/>
- </copy>
-
- <!-- Put everything in ${build}/debug/classes into the vecmath.jar file -->
- <jar jarfile="${build}/debug/lib/ext/vecmath.jar"
- manifest="${build}/debug/gen/VECMATH.MF" compress="false" update="yes">
- <fileset dir="${build}/debug/classes"/>
+ <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>
- </target>
-
- <target name="jar-opt" depends="compile-opt">
- <!-- Create the jar directory -->
- <mkdir dir="${build}/opt/lib/ext"/>
- <copy todir="${build}/opt/gen"
- overwrite="true">
- <fileset dir="${src}" 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 the copyright file and all license files -->
- <copy todir="${build}/opt/classes/javax">
+ <zip destfile="${build.dir}/jars/vecmath-src.zip">
+ <fileset dir="${src.dir}" includes="**/*.java"/>
<fileset dir="." includes="COPYRIGHT.txt"/>
- <fileset dir="." includes="*LICENSE*.txt"/>
- </copy>
+ <fileset dir="." includes="LICENSE.txt"/>
+ </zip>
- <!-- Put everything in ${build}/classes/opt into the vecmath.jar file -->
- <jar jarfile="${build}/opt/lib/ext/vecmath.jar"
- manifest="${build}/opt/gen/VECMATH.MF" compress="false" update="yes">
- <fileset dir="${build}/opt/classes"/>
- </jar>
</target>
- <target name="jar" depends="jar-opt,jar-debug"/>
-
- <target name="docs" depends="init">
- <!-- Create the build directory structure used by docs -->
- <mkdir dir="${build}/javadocs"/>
+ <target name="docs" depends="gen">
+ <mkdir dir="${javadoc.dir}"/>
- <!-- Compile the javadoc from ${src} into ${build}/javadocs -->
- <javadoc sourcepath="${src}"
+ <javadoc sourcepath="${src.dir}"
packagenames="javax.vecmath.*"
- maxmemory="128m"
- destdir="${build}/javadocs"
- windowtitle="Vecmath ${version}">
+ destdir="${javadoc.dir}"
+ windowtitle="Vecmath ${version_base}">
</javadoc>
-
- <!-- Copy the copyright file -->
- <copy todir="${build}/javadocs">
- <fileset dir="." includes="COPYRIGHT.txt"/>
- </copy>
- </target>
-
- <target name="dist" depends="jar-opt,docs">
- <!-- Create the distribution directory -->
- <mkdir dir="${dist}/lib/ext"/>
-
- <!-- Copy the jar file -->
- <copy file="${build}/opt/lib/ext/vecmath.jar" todir="${dist}/lib/ext"/>
-
- <!-- Create the docs distribution directory -->
- <mkdir dir="${dist}/javadocs"/>
-
- <!-- Put everything in ${build}/javadocs into the zip docname file -->
- <zip zipfile="${dist}/javadocs/${docname}.zip" basedir="${build}/javadocs"/>
</target>
- <target name="all" depends="jar-debug,dist"/>
-
- <target name="clean-dist">
- <!-- Delete the ${dist} directory tree -->
- <delete dir="${dist}"/>
- </target>
-
- <target name="clean">
- <!-- Delete the ${build}, and ${dist} directory trees -->
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- </target>
-
- <description>
-The following ant targets are available ("jar-debug" is the default):
-
- all - execute targets jar-debug and dist
-
- clean - removes WS/build/ and WS/dist/
-
- clean-dist - removes WS/dist
-
- compile - execute targets compile-debug and compile-opt
-
- compile-debug - builds all classes in WS/src into class files
- under WS/build/classes/debug
-
- compile-opt - builds all classes in WS/src/ into class files
- under WS/build/classes/opt
-
- dist - creates WS/dist/lib/opt/ext/vecmath.jar
- from class files under WS/build/classes/opt and
- creates WS/dist/doc/vecmath-${version}-doc.zip from
- javadoc under WS/build/javadocs
-
- docs - builds all classes in WS/src into javadoc under
- WS/build/javadocs
-
- echo - echo some useful information, such as user.home,
- ant.home and java.home
-
- jar - execute targets jar-debug and jar-opt
-
- jar-debug - creates WS/build/lib/debug/ext/vecmath.jar
- from class files under WS/build/classes/debug
-
- jar-opt - creates WS/build/lib/opt/ext/vecmath.jar
- from class files under WS/build/classes/opt
- </description>
</project>