generate SigarVersion.java

This commit is contained in:
Doug MacEachern 2004-07-23 17:36:17 +00:00
parent 018685a3b0
commit aef0ea6b73
1 changed files with 21 additions and 2 deletions

View File

@ -4,6 +4,8 @@
<project name="Sigar" default="build" basedir="."> <project name="Sigar" default="build" basedir=".">
<property name="sigar.version" value="1.1.5-dev"/>
<property file="${user.home}/.sigar-build.properties"/> <property file="${user.home}/.sigar-build.properties"/>
<property name="project.name" value="sigar"/> <property name="project.name" value="sigar"/>
<property name="jni.define.name" value="SIGAR"/> <property name="jni.define.name" value="SIGAR"/>
@ -21,7 +23,7 @@
<property name="src" location="src"/> <property name="src" location="src"/>
<property name="build" location="build"/> <property name="build" location="build"/>
<property name="build.javadoc" value="${build}/javadoc"/> <property name="build.javadoc" value="${build}/javadoc"/>
<property name="dist.name" value="hyperic-sigar"/> <property name="dist.name" value="hyperic-sigar-${sigar.version}"/>
<property name="dist" location="${build}/${dist.name}"/> <property name="dist" location="${build}/${dist.name}"/>
<property name="perl" value="perl"/> <property name="perl" value="perl"/>
<!-- trick TestFQDN into passing with: ant test -Dsigar.fdqn=foo.bar --> <!-- trick TestFQDN into passing with: ant test -Dsigar.fdqn=foo.bar -->
@ -79,7 +81,24 @@
</javac> </javac>
</target> </target>
<target name="prepare-src"> <target name="sigar-version">
<tstamp>
<format property="BUILD_DATE" pattern="MM/dd/yyyy hh:mm aa"/>
</tstamp>
<property name="version.file"
value="src/net/hyperic/sigar/SigarVersion.java"/>
<copy file="${version.file}.in"
tofile="${build}/${version.file}"/>
<replace file="${build}/${version.file}">
<replacefilter token="@@BUILD_DATE@@" value="${BUILD_DATE}"/>
<replacefilter token="@@VERSION_STRING@@" value="${sigar.version}"/>
</replace>
</target>
<target name="prepare-src" depends="sigar-version">
<mkdir dir="${build}/src"/> <mkdir dir="${build}/src"/>
<exec executable="${perl}" dir="."> <exec executable="${perl}" dir=".">