postgresql/contrib/retep/build.xml
Peter Eisentraut af3ce5daa4 Resolve a number of oddities in the Java build. First, remove the weird
redirections between the build files, which didn't work completely.  Now
you just go to the directory of your choice and run make.  Clean up the
build files to have a logical order, fix the unnecessary rebuilds, prevent
the deleting targets from removing files they're not responsible for.  Ant
1.3 does not have a bug.  It deletes directories just fine if you follow
the documentation.
2001-07-06 23:07:20 +00:00

99 lines
2.6 KiB
XML

<?xml version="1.0"?>
<!--
build file to build the donated retep tools packages
$Header: /cvsroot/pgsql/contrib/retep/Attic/build.xml,v 1.8 2001/07/06 23:07:20 petere Exp $
-->
<!DOCTYPE project [
<!ENTITY jarname "retepTools.jar">
]>
<project name="retep" default="all" basedir=".">
<!-- set global properties for this build -->
<property name="srcdir" value="." />
<property name="builddir" value="build" />
<property name="package" value="uk/org/retep" />
<property name="jardir" 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>
<target name="warning" depends="checks" unless="jdk1.2+">
<echo>
*** WARNING: Contributed retep tools need jdk1.2 or later.
*** Compilation NOT done
</echo>
</target>
<!-- default target -->
<target name="all">
<antcall target="jar" />
</target>
<!-- Builds the various jar files -->
<target name="jar" depends="compile">
<jar jarfile="${jardir}/&jarname;" whenempty="fail">
<fileset dir="${builddir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${srcdir}">
<include name="**/*.properties" />
</fileset>
</jar>
</target>
<!-- Builds the XML Tools -->
<target name="compile" depends="checks,prepare,warning" if="jdk1.2+">
<javac srcdir="${srcdir}" destdir="${builddir}">
<include name="${package}/**" />
<exclude name="${package}/**" unless="jdk1.2+" />
</javac>
</target>
<!-- Prepares the build by creating a directory to place the class files -->
<target name="prepare">
<mkdir dir="${builddir}" />
<mkdir dir="${jardir}" />
</target>
<target name="install" depends="all" if="install.directory">
<copy todir="${install.directory}" overwrite="true" filtering="off">
<fileset dir="${jardir}">
<include name="&jarname;" />
</fileset>
</copy>
</target>
<target name="uninstall" if="install.directory">
<delete>
<fileset dir="${install.directory}">
<include name="&jarname;" />
</fileset>
</delete>
</target>
<!-- This target removes any class files from the build directory -->
<target name="clean">
<delete quiet="true" dir="${builddir}" />
<delete quiet="true" dir="${jardir}" />
</target>
</project>