13c5114b8SDamjan Jovanovic<?xml version="1.0" encoding="UTF-8"?>
23c5114b8SDamjan Jovanovic<!--***********************************************************
33c5114b8SDamjan Jovanovic *
43c5114b8SDamjan Jovanovic * Licensed to the Apache Software Foundation (ASF) under one
53c5114b8SDamjan Jovanovic * or more contributor license agreements.  See the NOTICE file
63c5114b8SDamjan Jovanovic * distributed with this work for additional information
73c5114b8SDamjan Jovanovic * regarding copyright ownership.  The ASF licenses this file
83c5114b8SDamjan Jovanovic * to you under the Apache License, Version 2.0 (the
93c5114b8SDamjan Jovanovic * "License"); you may not use this file except in compliance
103c5114b8SDamjan Jovanovic * with the License.  You may obtain a copy of the License at
113c5114b8SDamjan Jovanovic *
123c5114b8SDamjan Jovanovic *   http://www.apache.org/licenses/LICENSE-2.0
133c5114b8SDamjan Jovanovic *
143c5114b8SDamjan Jovanovic * Unless required by applicable law or agreed to in writing,
153c5114b8SDamjan Jovanovic * software distributed under the License is distributed on an
163c5114b8SDamjan Jovanovic * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
173c5114b8SDamjan Jovanovic * KIND, either express or implied.  See the License for the
183c5114b8SDamjan Jovanovic * specific language governing permissions and limitations
193c5114b8SDamjan Jovanovic * under the License.
203c5114b8SDamjan Jovanovic *
213c5114b8SDamjan Jovanovic ***********************************************************-->
223c5114b8SDamjan Jovanovic
233c5114b8SDamjan Jovanovic
243c5114b8SDamjan Jovanovic<project name="sdbc_postgresql" default="main" basedir=".">
253c5114b8SDamjan Jovanovic
263c5114b8SDamjan Jovanovic    <!-- ================================================================= -->
273c5114b8SDamjan Jovanovic    <!-- settings                                                          -->
283c5114b8SDamjan Jovanovic    <!-- ================================================================= -->
293c5114b8SDamjan Jovanovic
303c5114b8SDamjan Jovanovic    <!-- global properties -->
313c5114b8SDamjan Jovanovic    <property file="../../../ant.properties"/>
323c5114b8SDamjan Jovanovic    <!-- version info -->
333c5114b8SDamjan Jovanovic    <property file="../../../solenv/inc/minor.mk"/>
343c5114b8SDamjan Jovanovic
353c5114b8SDamjan Jovanovic    <!-- name of this sub target used in recursive builds -->
363c5114b8SDamjan Jovanovic    <property name="target" value="sdbc_postgresql"/>
373c5114b8SDamjan Jovanovic
383c5114b8SDamjan Jovanovic    <!-- name of jar file created, without .jar extension -->
393c5114b8SDamjan Jovanovic    <property name="jarname" value="sdbc_postgresql"/>
403c5114b8SDamjan Jovanovic
413c5114b8SDamjan Jovanovic    <!-- relative path to project directory -->
423c5114b8SDamjan Jovanovic    <property name="prj" value="../.."/>
433c5114b8SDamjan Jovanovic
443c5114b8SDamjan Jovanovic    <!-- build output directory -->
453c5114b8SDamjan Jovanovic    <!-- FIXME: there are also extremely rare/obsolete dbcs/bndchk/truetime/hbtoolkit cases in main/solenv/inc/settings.mk -->
463c5114b8SDamjan Jovanovic    <condition property="out" value="${prj}/${OUTPATH}.cap">
473c5114b8SDamjan Jovanovic        <isset property="${profile}"/>
483c5114b8SDamjan Jovanovic    </condition>
493c5114b8SDamjan Jovanovic    <condition property="out" value="${prj}/${OUTPATH}.pro">
503c5114b8SDamjan Jovanovic        <isset property="${PRODUCT}"/>
513c5114b8SDamjan Jovanovic    </condition>
523c5114b8SDamjan Jovanovic    <property name="out" value="${prj}/${OUTPATH}"/>
533c5114b8SDamjan Jovanovic
543c5114b8SDamjan Jovanovic    <!-- build directories -->
553c5114b8SDamjan Jovanovic    <property name="build.dir" value="${out}"/>
563c5114b8SDamjan Jovanovic    <property name="build.class" value="${build.dir}/class/${target}"/>
573c5114b8SDamjan Jovanovic    <property name="build.misc" value="${build.dir}/misc/${target}"/>
583c5114b8SDamjan Jovanovic
593c5114b8SDamjan Jovanovic    <!-- start of java source code package structure -->
603c5114b8SDamjan Jovanovic    <property name="java.dir" value="src"/>
613c5114b8SDamjan Jovanovic
623c5114b8SDamjan Jovanovic    <!-- define how to handle CLASSPATH environment -->
633c5114b8SDamjan Jovanovic    <property name="build.sysclasspath" value="ignore"/>
643c5114b8SDamjan Jovanovic
653c5114b8SDamjan Jovanovic    <!-- classpath settings for compile and javadoc tasks -->
663c5114b8SDamjan Jovanovic    <path id="classpath">
673c5114b8SDamjan Jovanovic        <pathelement location="${OUTDIR}/bin/juh.jar"/>
683c5114b8SDamjan Jovanovic        <pathelement location="${OUTDIR}/bin/jurt.jar"/>
693c5114b8SDamjan Jovanovic        <pathelement location="${OUTDIR}/bin/ridl.jar"/>
703c5114b8SDamjan Jovanovic        <pathelement location="${OUTDIR}/bin/unoil.jar"/>
71*60ba3965SDamjan Jovanovic        <pathelement location="${out}/class/dbtools/dbtools.jar"/>
723c5114b8SDamjan Jovanovic    </path>
733c5114b8SDamjan Jovanovic
743c5114b8SDamjan Jovanovic    <!-- name to display in documentation -->
753c5114b8SDamjan Jovanovic    <property name="docname" value="sdbc_postgresql"/>
763c5114b8SDamjan Jovanovic
773c5114b8SDamjan Jovanovic    <!-- set "modern" java compiler -->
783c5114b8SDamjan Jovanovic    <property name="build.compiler" value="modern"/>
793c5114b8SDamjan Jovanovic
803c5114b8SDamjan Jovanovic    <!-- set wether we want to compile with debug information -->
813c5114b8SDamjan Jovanovic    <property name="debug" value="on"/>
823c5114b8SDamjan Jovanovic
833c5114b8SDamjan Jovanovic    <!-- set wether we want to compile with optimisation -->
843c5114b8SDamjan Jovanovic    <property name="optimize" value="off"/>
853c5114b8SDamjan Jovanovic
863c5114b8SDamjan Jovanovic    <!-- set wether we want to compile with or without deprecation -->
873c5114b8SDamjan Jovanovic    <property name="deprecation" value="on"/>
883c5114b8SDamjan Jovanovic
893c5114b8SDamjan Jovanovic    <target name="info">
903c5114b8SDamjan Jovanovic        <echo message="--------------------"/>
913c5114b8SDamjan Jovanovic        <echo message="${target}"/>
923c5114b8SDamjan Jovanovic        <echo message="--------------------"/>
933c5114b8SDamjan Jovanovic    </target>
943c5114b8SDamjan Jovanovic
953c5114b8SDamjan Jovanovic    <!-- ================================================================= -->
963c5114b8SDamjan Jovanovic    <!-- custom targets                                                    -->
973c5114b8SDamjan Jovanovic    <!-- ================================================================= -->
983c5114b8SDamjan Jovanovic
993c5114b8SDamjan Jovanovic    <!-- the main target, called in recursive builds -->
1003c5114b8SDamjan Jovanovic    <target name="main" depends="info,prepare,compile,jar,javadoc,zipdoc"/>
1013c5114b8SDamjan Jovanovic
1023c5114b8SDamjan Jovanovic    <!-- prepare output directories -->
1033c5114b8SDamjan Jovanovic    <target name="prepare">
1043c5114b8SDamjan Jovanovic        <mkdir dir="${build.dir}"/>
1053c5114b8SDamjan Jovanovic        <mkdir dir="${build.dir}/doc/${target}"/>
1063c5114b8SDamjan Jovanovic        <mkdir dir="${build.class}"/>
1073c5114b8SDamjan Jovanovic        <mkdir dir="${build.misc}"/>
1083c5114b8SDamjan Jovanovic    </target>
1093c5114b8SDamjan Jovanovic
1103c5114b8SDamjan Jovanovic
1113c5114b8SDamjan Jovanovic    <target name="res" depends="prepare">
1123c5114b8SDamjan Jovanovic        <copy todir="${build.class}">
1133c5114b8SDamjan Jovanovic             <fileset dir="${java.dir}">
1143c5114b8SDamjan Jovanovic                 <include name="**/*.properties"/>
1153c5114b8SDamjan Jovanovic                 <include name="**/*.css"/>
1163c5114b8SDamjan Jovanovic                 <include name="**/*.dtd"/>
1173c5114b8SDamjan Jovanovic                 <include name="**/*.form"/>
1183c5114b8SDamjan Jovanovic                 <include name="**/*.gif "/>
1193c5114b8SDamjan Jovanovic                 <include name="**/*.htm"/>
1203c5114b8SDamjan Jovanovic                 <include name="**/*.html"/>
1213c5114b8SDamjan Jovanovic                 <include name="**/*.js"/>
1223c5114b8SDamjan Jovanovic                 <include name="**/*.mod"/>
1233c5114b8SDamjan Jovanovic                 <include name="**/*.sql"/>
1243c5114b8SDamjan Jovanovic                 <include name="**/*.xml"/>
1253c5114b8SDamjan Jovanovic                 <include name="**/*.xsl"/>
1263c5114b8SDamjan Jovanovic                 <include name="**/*.map"/>
1273c5114b8SDamjan Jovanovic
1283c5114b8SDamjan Jovanovic             </fileset>
1293c5114b8SDamjan Jovanovic        </copy>
1303c5114b8SDamjan Jovanovic    </target>
1313c5114b8SDamjan Jovanovic
1323c5114b8SDamjan Jovanovic
1333c5114b8SDamjan Jovanovic    <target name="compile" depends="prepare,res">
1343c5114b8SDamjan Jovanovic	<javac destdir="${build.class}"
1353c5114b8SDamjan Jovanovic	       debug="${debug}"
1363c5114b8SDamjan Jovanovic               debuglevel="lines,vars,source"
1373c5114b8SDamjan Jovanovic               deprecation="${deprecation}"
1383c5114b8SDamjan Jovanovic	       optimize="${optimize}"
1393c5114b8SDamjan Jovanovic	       classpathref="classpath">
1403c5114b8SDamjan Jovanovic            <src path="${java.dir}"/>
1413c5114b8SDamjan Jovanovic	    <include name="**/*.java"/>
1423c5114b8SDamjan Jovanovic	</javac>
1433c5114b8SDamjan Jovanovic    </target>
1443c5114b8SDamjan Jovanovic
1453c5114b8SDamjan Jovanovic    <!-- check if javadoc is up to date -->
1463c5114b8SDamjan Jovanovic    <target name="javadoc_check" depends="prepare" if="build.dir">
1473c5114b8SDamjan Jovanovic	<uptodate property="javadocBuild.notRequired" value="true"
1483c5114b8SDamjan Jovanovic            targetfile="${build.dir}/doc/${target}/${target}_javadoc.zip">
1493c5114b8SDamjan Jovanovic		<srcfiles dir="${java.dir}" includes="**/*.java"/>
1503c5114b8SDamjan Jovanovic	</uptodate>
1513c5114b8SDamjan Jovanovic    </target>
1523c5114b8SDamjan Jovanovic
1533c5114b8SDamjan Jovanovic    <!-- generate java documentation -->
1543c5114b8SDamjan Jovanovic    <target name="javadoc" depends="prepare,javadoc_check,compile"
1553c5114b8SDamjan Jovanovic         unless="javadocBuild.notRequired"
1563c5114b8SDamjan Jovanovic         if="build.dir">
1573c5114b8SDamjan Jovanovic
1583c5114b8SDamjan Jovanovic        <javadoc destdir="${build.dir}/doc/${target}/javadoc"
1593c5114b8SDamjan Jovanovic                 verbose="false"
1603c5114b8SDamjan Jovanovic                 author="false"
1613c5114b8SDamjan Jovanovic                 nodeprecated="true"
1623c5114b8SDamjan Jovanovic                 nodeprecatedlist="true"
1633c5114b8SDamjan Jovanovic                 use="true"
1643c5114b8SDamjan Jovanovic                 Doctitle="${docname}"
1653c5114b8SDamjan Jovanovic                 windowtitle="${docname}"
1663c5114b8SDamjan Jovanovic                 classpathref="classpath">
1673c5114b8SDamjan Jovanovic
1683c5114b8SDamjan Jovanovic            <packageset dir="${java.dir}" defaultexcludes="yes">
1693c5114b8SDamjan Jovanovic                <include name="com/**"/>
1703c5114b8SDamjan Jovanovic                <include name="org/**"/>
1713c5114b8SDamjan Jovanovic            </packageset>
1723c5114b8SDamjan Jovanovic
1733c5114b8SDamjan Jovanovic            <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api"
1743c5114b8SDamjan Jovanovic                  packagelistLoc="${common.doc}/jdk1.4.2"/>
1753c5114b8SDamjan Jovanovic            <link offline="true"
1763c5114b8SDamjan Jovanovic                  href="http://java.sun.com/products/servlet/2.3/javadoc"
1773c5114b8SDamjan Jovanovic                  packagelistLoc="${common.doc}/servlet2.3"/>
1783c5114b8SDamjan Jovanovic            <link offline="true"
1793c5114b8SDamjan Jovanovic                  href="http://logging.apache.org/log4j/docs/api"
1803c5114b8SDamjan Jovanovic                  packagelistLoc="${common.doc}/log4j-1.2.8"/>
1813c5114b8SDamjan Jovanovic            <link offline="true"
1823c5114b8SDamjan Jovanovic                  href="http://java.sun.com/products/javabeans/glasgow/javadocs"
1833c5114b8SDamjan Jovanovic                  packagelistLoc="${common.doc}/jaf-1.0.2"/>
1843c5114b8SDamjan Jovanovic            <link offline="true"
1853c5114b8SDamjan Jovanovic                  href="http://java.sun.com/products/javamail/javadocs"
1863c5114b8SDamjan Jovanovic                  packagelistLoc="${common.doc}/javamail-1.3.1"/>
1873c5114b8SDamjan Jovanovic            <link offline="true"
1883c5114b8SDamjan Jovanovic                  href="http://ws.apache.org/soap/docs"
1893c5114b8SDamjan Jovanovic                  packagelistLoc="${common.doc}/soap-2.3.1"/>
1903c5114b8SDamjan Jovanovic
1913c5114b8SDamjan Jovanovic            <bottom>&lt;i&gt;Copyright &amp;#169; 2004 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA&lt;/i&gt;</bottom>
1923c5114b8SDamjan Jovanovic            <header>${docname}</header>
1933c5114b8SDamjan Jovanovic
1943c5114b8SDamjan Jovanovic       </javadoc>
1953c5114b8SDamjan Jovanovic    </target>
1963c5114b8SDamjan Jovanovic
1973c5114b8SDamjan Jovanovic    <!-- zip documentation and store in build/doc/${target} -->
1983c5114b8SDamjan Jovanovic    <target name="zipdoc" depends="javadoc" if="build.dir" unless="javadocBuild.notRequired">
1993c5114b8SDamjan Jovanovic	<zip zipfile="${build.dir}/doc/${target}/${target}_javadoc.zip"
2003c5114b8SDamjan Jovanovic      basedir="${build.dir}/doc/${target}/javadoc"
2013c5114b8SDamjan Jovanovic      update="true"/>
2023c5114b8SDamjan Jovanovic    </target>
2033c5114b8SDamjan Jovanovic
2043c5114b8SDamjan Jovanovic    <!-- clean up -->
2053c5114b8SDamjan Jovanovic    <target name="clean" depends="prepare">
2063c5114b8SDamjan Jovanovic        <delete dir="${build.class}" includeEmptyDirs="true"/>
2073c5114b8SDamjan Jovanovic        <delete dir="${build.dir}/doc/${target}" includeEmptyDirs="true"/>
2083c5114b8SDamjan Jovanovic    </target>
2093c5114b8SDamjan Jovanovic
2103c5114b8SDamjan Jovanovic    <!-- create jar file -->
2113c5114b8SDamjan Jovanovic    <target name="jar" depends="prepare,compile" if="build.class">
2123c5114b8SDamjan Jovanovic        <jar jarfile="${build.class}/${jarname}.jar"
2133c5114b8SDamjan Jovanovic             basedir="${build.class}">
2143c5114b8SDamjan Jovanovic            <manifest>
215*60ba3965SDamjan Jovanovic                <attribute name="Class-Path" value="${jar-class-path} juh.jar jurt.jar ridl.jar unoil.jar dbtools.jar"/>
2163c5114b8SDamjan Jovanovic                <attribute name="Solar-Version" value="${RSCREVISION}"/>
2173c5114b8SDamjan Jovanovic                <attribute name="RegistrationClassName" value="com.sun.star.sdbcx.comp.postgresql.PostgresqlDriver"/>
2183c5114b8SDamjan Jovanovic                <attribute name="Sealed" value="true"/>
2193c5114b8SDamjan Jovanovic                <attribute name="UNO-Type-Path" value=""/>
2203c5114b8SDamjan Jovanovic            </manifest>
2213c5114b8SDamjan Jovanovic            <include name="**/*.class"/>
2223c5114b8SDamjan Jovanovic            <include name="**/*.properties"/>
2233c5114b8SDamjan Jovanovic            <include name="**/*.css"/>
2243c5114b8SDamjan Jovanovic            <include name="**/*.dtd"/>
2253c5114b8SDamjan Jovanovic            <include name="**/*.form"/>
2263c5114b8SDamjan Jovanovic            <include name="**/*.gif "/>
2273c5114b8SDamjan Jovanovic            <include name="**/*.htm"/>
2283c5114b8SDamjan Jovanovic            <include name="**/*.html"/>
2293c5114b8SDamjan Jovanovic            <include name="**/*.js"/>
2303c5114b8SDamjan Jovanovic            <include name="**/*.mod"/>
2313c5114b8SDamjan Jovanovic            <include name="**/*.sql"/>
2323c5114b8SDamjan Jovanovic            <include name="**/*.xml"/>
2333c5114b8SDamjan Jovanovic            <include name="**/*.xsl"/>
2343c5114b8SDamjan Jovanovic            <include name="**/*.map"/>
2353c5114b8SDamjan Jovanovic        </jar>
2363c5114b8SDamjan Jovanovic    </target>
2373c5114b8SDamjan Jovanovic
2383c5114b8SDamjan Jovanovic    <target name="test" depends="prepare">
2393c5114b8SDamjan Jovanovic    </target>
2403c5114b8SDamjan Jovanovic
2413c5114b8SDamjan Jovanovic</project>
2423c5114b8SDamjan Jovanovic
243