linamh/dev-java/isnativec/files/build.xml
geos_one 5860781de4 add intarsys libs
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1139 6952d904-891a-0410-993b-d76249ca496b
2009-04-20 19:16:23 +00:00

100 lines
3.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="isnativec" default="build-jars" basedir="../">
<description>
This is a generic native code wrapper
</description>
<!-- set global properties for this build -->
<property name="user.name" value="intarsys consulting GmbH"/>
<property name="isnativec.src.dir" location="src"/>
<property name="isnativec.resource.dir" location="resource"/>
<target name="init">
<property file="ant/build.properties" />
<property name="isnativec.build.root" location="${build.dir}/isnativec"/>
<property name="isnativec.build.dir" location="${isnativec.build.root}/build"/>
<property name="isnativec.dist.dir" location="${isnativec.build.root}/dist"/>
<property name="isnativec.javadoc.dir" location="${isnativec.build.root}/javadoc"/>
</target>
<target name="make-structure" depends="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${isnativec.build.dir}"/>
<mkdir dir="${isnativec.dist.dir}"/>
<mkdir dir="${isnativec.javadoc.dir}"/>
</target>
<target name="clean" depends="init" description="clean up" >
<!-- Delete the ${dist} directory trees -->
<delete dir="${isnativec.javadoc.dir}"/>
<delete dir="${isnativec.dist.dir}"/>
<delete dir="${isnativec.build.dir}"/>
</target>
<target name="compile" depends="make-structure" description="isnativec compile" >
<!-- Construct classpath -->
<path id="isnativec.classpath">
<fileset dir="${libs.dir}">
<include name="**/${isrt.jar.name}.jar"/>
<include name="**/${jna.jar.name}.jar"/>
</fileset>
<pathelement path="${isnativec.build.dir}"/>
</path>
<!-- Compile the java code -->
<javac compiler="javac1.4" target="1.4" source="1.4" srcdir="${isnativec.src.dir}" destdir="${isnativec.build.dir}" debug="true">
<classpath refid="isnativec.classpath"/>
</javac>
</target>
<target name="build-jars" depends="compile" description="generate the distribution" >
<jar jarfile="${isnativec.dist.dir}/${isnativec.jar.name}.jar" basedir="${isnativec.build.dir}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value=""/>
<attribute name="Class-Path" value="${isrt.jar.name}.jar ${jna.jar.name}.jar"/>
</manifest>
<fileset dir="${isnativec.resource.dir}">
<include name="**/*"/>
</fileset>
</jar>
</target>
<!-- Javadoc -->
<target name="javadoc" depends="make-structure">
<javadoc
packagenames="de.intarsys.nativec.*"
sourcepath="${isnativec.src.dir}"
destdir="${isnativec.javadoc.dir}"
author="true"
version="true"
use="true"
windowtitle="nativec API"
doctitle="nativec API" >
<classpath refid="isnativec.classpath"/>
</javadoc>
</target>
<target name="buildZipSrcPackage" depends="javadoc" description="generate build sources zip package" >
<zip destfile="${isnativec.dist.dir}/${isnativec.jar.name}-build-src.zip">
<fileset dir="..">
<include name="isnativec/src/**/*"/>
</fileset>
<fileset dir="${build.dir}">
<include name="isnativec/javadoc/**/*.*"/>
</fileset>
<fileset dir="..">
<include name="isnativec/ant/**/*.*"/>
</fileset>
</zip>
</target>
</project>