generate SigarVersion.java
This commit is contained in:
parent
018685a3b0
commit
aef0ea6b73
|
@ -4,6 +4,8 @@
|
|||
|
||||
<project name="Sigar" default="build" basedir=".">
|
||||
|
||||
<property name="sigar.version" value="1.1.5-dev"/>
|
||||
|
||||
<property file="${user.home}/.sigar-build.properties"/>
|
||||
<property name="project.name" value="sigar"/>
|
||||
<property name="jni.define.name" value="SIGAR"/>
|
||||
|
@ -21,7 +23,7 @@
|
|||
<property name="src" location="src"/>
|
||||
<property name="build" location="build"/>
|
||||
<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="perl" value="perl"/>
|
||||
<!-- trick TestFQDN into passing with: ant test -Dsigar.fdqn=foo.bar -->
|
||||
|
@ -79,7 +81,24 @@
|
|||
</javac>
|
||||
</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"/>
|
||||
|
||||
<exec executable="${perl}" dir=".">
|
||||
|
|
Loading…
Reference in New Issue