blob: 41bc9212839260bd149dd8b992537c8af8f1fb6d [file] [log] [blame]
<!--
The dist target prepares the binary distribution tarball for
end users. It forces a complete rebuild of everything through its
dependency on the "clean" target in order to prevent garbage
like the cocoon logfiles from ending up in the distribution tarball.
-->
<target name="prepare-dist" depends="distclean,war">
<copy todir="${dist.root}/${fullname}">
<fileset dir="${basedir}">
<include name="INSTALL*"/>
<include name="README.txt"/>
</fileset>
</copy>
</target>
<target name="dist" depends="prepare-dist" description="Build a regular binary distribution tar ball">
<tar tarfile="${dist.bin.dir}.tar" basedir="${dist.root}" includes="${fullname}/**"/>
<gzip zipfile="${dist.bin.dir}.tar.gz" src="${dist.bin.dir}.tar"/>
<delete file="${dist.bin.dir}.tar"/>
</target>
<!--
The dist target prepares the binary distribution tarball for
end users. It forces a complete rebuild of everything through its
dependency on the "clean" target in order to prevent garbage
like the cocoon logfiles from ending up in the distribution tarball.
-->
<target name="snapshot" depends="prepare-dist" description="Build a snapshot binary distribution tar ball (the same as 'dist' except for the filename)">
<copy todir="${snapshot.bin.dir}">
<fileset dir="${dist.root}/${fullname}"/>
</copy>
<tar tarfile="${snapshot.bin.dir}.tar" basedir="${dist.root}" includes="${fullname}-bin-${SNAPSHOT_STAMP}/**"/>
<gzip zipfile="${snapshot.bin.dir}.tar.gz" src="${snapshot.bin.dir}.tar"/>
<delete file="${snapshot.bin.dir}.tar"/>
<zip zipfile="${snapshot.bin.dir}.zip" basedir="${dist.root}/${fullname}-bin-${SNAPSHOT_STAMP}"/>
</target>
<!--
The dist-src target prepares the source distribution tarball for
developers. It also depends on the clean target to remove all build stuff.
-->
<target name="prepare-dist-src" depends="distclean">
<mkdir dir="${dist.src.dir}"/>
<copy todir="${dist.src.dir}">
<fileset dir=".">
<exclude name="build.properties"/>
<exclude name=".classpath"/>
<exclude name=".cvsignore"/>
<exclude name=".project"/>
</fileset>
</copy>
</target>
<target name="dist-src" depends="prepare-dist-src" description="Builds a regular tar ball containing the sources for developers">
<tar tarfile="${dist.src.dir}.tar" basedir="${dist.root}" includes="${fullname}-src/**"/>
<gzip zipfile="${dist.src.dir}.tar.gz" src="${dist.src.dir}.tar"/>
<delete file="${dist.src.dir}.tar"/>
</target>
<!--
The dist target prepares the binary distribution tarball for
end users. It forces a complete rebuild of everything through its
dependency on the "clean" target in order to prevent garbage
like the cocoon logfiles from ending up in the distribution tarball.
-->
<target name="snapshot-src" depends="prepare-dist-src" description="Builds a snapshot tar ball containing the sources for developers (the same as 'dist-src' except for the filename)">
<copy todir="${snapshot.src.dir}">
<fileset dir="${dist.src.dir}"/>
</copy>
<tar tarfile="${snapshot.src.dir}.tar" basedir="${dist.root}" includes="${fullname}-src-${SNAPSHOT_STAMP}/**"/>
<gzip zipfile="${snapshot.src.dir}.tar.gz" src="${snapshot.src.dir}.tar"/>
<delete file="${snapshot.src.dir}.tar"/>
</target>
<target name="distclean" depends="clean" description="Cleans everything to the original state">
<delete dir="${build.root}"/>
<delete dir="${dist.root}"/>
</target>