210 lines
8.0 KiB
Plaintext
210 lines
8.0 KiB
Plaintext
|
<!-- =================================================================== -->
|
||
|
<!-- Creates the source distribution -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist-src" depends="docs, javadocs"
|
||
|
description="Prepares the source distribution">
|
||
|
<!-- Simply copy all and add the html docs -->
|
||
|
<mkdir dir="${dist.root}"/>
|
||
|
<mkdir dir="${dist.src.dir}"/>
|
||
|
<mkdir dir="${dist.src.dir}/lib"/>
|
||
|
<mkdir dir="${dist.src.dir}/src"/>
|
||
|
<mkdir dir="${dist.src.dir}/src/java"/>
|
||
|
<mkdir dir="${dist.src.dir}/src/documentation"/>
|
||
|
<mkdir dir="${dist.src.dir}/src/resources"/>
|
||
|
<mkdir dir="${dist.src.dir}/src/scratchpad"/>
|
||
|
<mkdir dir="${dist.src.dir}/src/testcases"/>
|
||
|
<mkdir dir="${dist.src.dir}/src/contrib"/>
|
||
|
<mkdir dir="${dist.src.dir}/docs"/>
|
||
|
<mkdir dir="${dist.src.dir}/docs/apidocs"/>
|
||
|
<mkdir dir="${dist.src.dir}/tools"/>
|
||
|
|
||
|
<!--
|
||
|
<copy todir="${dist.src.dir}/bin">
|
||
|
<fileset dir="${bin.dir}"/>
|
||
|
</copy> -->
|
||
|
<copy todir="${dist.src.dir}/tools">
|
||
|
<fileset dir="${tools.dir}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/src/documentation">
|
||
|
<fileset dir="${build.context}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/lib">
|
||
|
<fileset dir="${lib.dir}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/src/resources" filtering="on">
|
||
|
<fileset dir="${resource.dir}">
|
||
|
<exclude name="**/*.gif"/>
|
||
|
<exclude name="**/*.jpg"/>
|
||
|
<exclude name="**/*.png"/>
|
||
|
</fileset>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/src/resources" filtering="off">
|
||
|
<fileset dir="${resource.dir}">
|
||
|
<include name="**/*.gif"/>
|
||
|
<include name="**/*.jpg"/>
|
||
|
<include name="**/*.png"/>
|
||
|
</fileset>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/src/java" filtering="on">
|
||
|
<fileset dir="${java.dir}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/src/scratchpad" filtering="off">
|
||
|
<fileset dir="${scratchpad.dir}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/src/contrib" filtering="off">
|
||
|
<fileset dir="${contrib.dir}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/src/testcases" filtering="off">
|
||
|
<fileset dir="${test.dir}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}/docs">
|
||
|
<fileset dir="${build.docs}"/>
|
||
|
</copy>
|
||
|
<copy todir="${dist.src.dir}/docs/apidocs">
|
||
|
<fileset dir="${build.javadocs}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}">
|
||
|
<fileset dir="${docs.dir}">
|
||
|
<include name="changes.xml, todo.xml"/>
|
||
|
</fileset>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.src.dir}" filtering="on">
|
||
|
<fileset dir=".">
|
||
|
<include name="README.txt"/>
|
||
|
<include name="legal/*"/>
|
||
|
<include name="*.bat"/>
|
||
|
<include name="*.sh"/>
|
||
|
<include name="*.xml"/>
|
||
|
</fileset>
|
||
|
</copy>
|
||
|
|
||
|
<chmod perm="+x" file="${dist.src.dir}/build.sh"/>
|
||
|
<chmod perm="+x" file="${dist.src.dir}/tools/bin/antRun"/>
|
||
|
<fixcrlf srcdir="${dist.src.dir}" includes="**.sh" eol="lf"/>
|
||
|
<fixcrlf srcdir="${dist.src.dir}" includes="antRun" eol="lf"/>
|
||
|
<fixcrlf srcdir="${dist.src.dir}" includes="**.bat" eol="crlf"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Packages the source distribution as .zip -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist-src-zip" depends="dist-src"
|
||
|
description="Generates the source distribution as a .zip file">
|
||
|
<zip zipfile="${dist.target}/${dist.name}-src.zip"
|
||
|
basedir="${dist.root}/source"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Packages the source distribution with .tar.gzip -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist-src-tgz" depends="dist-src"
|
||
|
description="Generates the source distribution as a .tar.gz file">
|
||
|
<tar tarfile="${dist.target}/${dist.name}-src.tar"
|
||
|
basedir="${dist.root}/source"
|
||
|
longfile="gnu"/>
|
||
|
<gzip zipfile="${dist.target}/${dist.name}-src.tar.gz"
|
||
|
src="${dist.target}/${dist.name}-src.tar"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Creates the binary distribution -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist-bin" depends="package, docs, javadocs"
|
||
|
description="Prepares the binary distribution">
|
||
|
<!-- Copy the html docs -->
|
||
|
<mkdir dir="${dist.root}"/>
|
||
|
<mkdir dir="${dist.bin.dir}"/>
|
||
|
<mkdir dir="${dist.bin.dir}/lib"/>
|
||
|
<mkdir dir="${dist.bin.dir}/docs"/>
|
||
|
<mkdir dir="${dist.bin.dir}/docs/apidocs"/>
|
||
|
|
||
|
<copy file="${build.dir}/${name}.jar" tofile="${dist.bin.dir}/lib/${name}-${version}.jar"/>
|
||
|
|
||
|
<copy todir="${dist.bin.dir}/docs">
|
||
|
<fileset dir="${build.docs}"/>
|
||
|
</copy>
|
||
|
<copy todir="${dist.bin.dir}/docs/apidocs">
|
||
|
<fileset dir="${build.javadocs}"/>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.bin.dir}">
|
||
|
<fileset dir="${docs.dir}">
|
||
|
<include name="changes.xml, todo.xml"/>
|
||
|
</fileset>
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${dist.bin.dir}" filtering="on">
|
||
|
<fileset dir=".">
|
||
|
<include name="README.txt"/>
|
||
|
<include name="legal/*"/>
|
||
|
</fileset>
|
||
|
</copy>
|
||
|
|
||
|
</target>
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Packages the binary distribution as .zip -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist-bin-zip" depends="dist-bin"
|
||
|
description="Generates the binary distribution as a .zip file">
|
||
|
<zip zipfile="${dist.target}/${dist.name}-bin.zip"
|
||
|
basedir="${dist.root}/bin"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Packages the binary distribution with .tar.gzip -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist-bin-tgz" depends="dist-bin"
|
||
|
description="Generates the binary distribution as a .tar.gz file">
|
||
|
<tar tarfile="${dist.target}/${dist.name}-bin.tar"
|
||
|
basedir="${dist.root}/bin"
|
||
|
longfile="gnu"/>
|
||
|
<gzip zipfile="${dist.target}/${dist.name}-bin.tar.gz"
|
||
|
src="${dist.target}/${dist.name}-bin.tar"/>
|
||
|
</target>
|
||
|
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Build all distributions -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist"
|
||
|
depends="dist-info, dist-bin-tgz, dist-bin-zip, dist-src-tgz, dist-src-zip"
|
||
|
description="* Generates all distributions (source/binary)">
|
||
|
</target>
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Build all distributions -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="dist-info" depends="init">
|
||
|
<echo>**********************************************</echo>
|
||
|
<echo>*</echo>
|
||
|
<echo>* Build all distributions:</echo>
|
||
|
<echo>* - source distribution for windows/unix.</echo>
|
||
|
<echo>* - binary distribution for windows/unix.</echo>
|
||
|
<echo>*</echo>
|
||
|
<echo>* This may take a while...</echo>
|
||
|
<echo>*</echo>
|
||
|
<echo>***********************************************</echo>
|
||
|
<echo/>
|
||
|
</target>
|
||
|
|
||
|
<!-- =================================================================== -->
|
||
|
<!-- Fix line endings in src -->
|
||
|
<!-- =================================================================== -->
|
||
|
<target name="fixsrclf" depends="init" description="Fix lf in src directory (internal use only!)">
|
||
|
<fixcrlf srcdir="${java.dir}" includes="**/*.java" eol="lf"/>
|
||
|
</target>
|
||
|
|
||
|
|