mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
now compiles clean with jdk 1.4
This commit is contained in:
parent
2ea01da59b
commit
178961ad47
@ -4,7 +4,7 @@
|
||||
build file to allow ant (http://jakarta.apache.org/ant/) to be used
|
||||
to build the PostgreSQL JDBC Driver
|
||||
|
||||
$Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/build.xml,v 1.18 2001/09/23 04:11:14 momjian Exp $
|
||||
$Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/build.xml,v 1.19 2002/02/22 02:07:30 davec Exp $
|
||||
|
||||
-->
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<property name="jardir" value="jars" />
|
||||
<property name="builddir" value="build" />
|
||||
<property name="package" value="org/postgresql" />
|
||||
|
||||
<property name="debug" value="yes" />
|
||||
|
||||
<!--
|
||||
This is a simpler method than utils.CheckVersion
|
||||
@ -30,8 +30,24 @@
|
||||
Important: This must have the following order: jdbc1, jdbc2, enterprise
|
||||
-->
|
||||
<target name="check_versions">
|
||||
<available property="jdk1.2+" classname="java.lang.ThreadLocal" />
|
||||
<available property="jdk1.2e+" classname="javax.sql.DataSource" />
|
||||
<condition property="jdbc1">
|
||||
<equals arg1="${ant.java.version}" arg2="1.1"/>
|
||||
</condition>
|
||||
<condition property="jdbc2">
|
||||
<or>
|
||||
<equals arg1="${ant.java.version}" arg2="1.2"/>
|
||||
<equals arg1="${ant.java.version}" arg2="1.3"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="jdbc3">
|
||||
<equals arg1="${ant.java.version}" arg2="1.4"/>
|
||||
</condition>
|
||||
<condition property="datasource">
|
||||
<and>
|
||||
<equals arg1="${jdbc2}" arg2="true" />
|
||||
<available classname="javax.sql.DataSource"/>
|
||||
</and>
|
||||
</condition>
|
||||
<available property="junit" classname="junit.framework.Test" />
|
||||
</target>
|
||||
|
||||
@ -69,17 +85,17 @@
|
||||
|
||||
<!-- This is the core of the driver. It is common for all three versions. -->
|
||||
<target name="compile" depends="prepare,check_versions,driver">
|
||||
<javac srcdir="${srcdir}" destdir="${builddir}">
|
||||
<javac srcdir="${srcdir}" destdir="${builddir}" debug="${debug}">
|
||||
<include name="${package}/**" />
|
||||
|
||||
<exclude name="${package}/jdbc1/**" if="jdk1.2+" />
|
||||
<exclude name="${package}/jdbc2/**" unless="jdk1.2+" />
|
||||
<exclude name="${package}/jdbc1/**" unless="jdbc1"/>
|
||||
<exclude name="${package}/jdbc2/**" unless="jdbc2"/>
|
||||
|
||||
<exclude name="${package}/largeobject/PGblob.java" unless="jdk1.2+" />
|
||||
<exclude name="${package}/largeobject/PGclob.java" unless="jdk1.2+" />
|
||||
<exclude name="${package}/largeobject/PGblob.java" unless="jdbc2" />
|
||||
<exclude name="${package}/largeobject/PGclob.java" unless="jdbc2" />
|
||||
|
||||
<exclude name="${package}/PostgresqlDataSource.java" unless="jdk1.2e+" />
|
||||
<exclude name="${package}/xa/**" unless="jdk1.2e+" />
|
||||
<exclude name="${package}/PostgresqlDataSource.java" unless="datasource" />
|
||||
<exclude name="${package}/xa/**" unless="datasource" />
|
||||
|
||||
<exclude name="${package}/test/**" unless="junit" />
|
||||
</javac>
|
||||
@ -93,9 +109,20 @@
|
||||
<target name="driver" depends="prepare,check_versions">
|
||||
<!-- determine the edition text -->
|
||||
<property name="edition" value="JDBC1" />
|
||||
<available property="edition" value="JDBC2" classname="java.lang.ThreadLocal" />
|
||||
<available property="edition" value="JDBC2" classname="java.lang.StrictMath" />
|
||||
<available property="edition" value="JDBC2 Enterprise" classname="javax.sql.DataSource" />
|
||||
<condition property="edition" value="JDBC2">
|
||||
<or>
|
||||
<equals arg1="${jdbc2}" arg2="true"/>
|
||||
<equals arg1="${jdbc3}" arg2="true"/> <!-- fake it for now -->
|
||||
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<condition property="edition" value="JDBC2 Enterprise">
|
||||
<and>
|
||||
<available classname="javax.sql.DataSource" />
|
||||
<equals arg1="${jdbc2}" arg2="true"/>
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<!-- determine the connection class -->
|
||||
<property name="connectclass" value="org.postgresql.jdbc1.Connection" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user