run examples target

This commit is contained in:
Doug MacEachern 2004-09-22 17:57:17 +00:00
parent 6c7fccda29
commit 739f59c255
2 changed files with 20 additions and 1 deletions

View File

@ -21,6 +21,15 @@
</nant>
</target>
<target name="run-examples">
<nant buildfile="examples/default.build"
inheritall="true" target="run">
<properties>
<property name="build.dir" value="../build"/>
<property name="sigarsharp" value="../build/SigarSharp.dll"/>
</properties>
</nant>
</target>
<target name="build" description="Build C# Sigar bindings">
<mkdir dir="${build.dir}"/>

View File

@ -8,6 +8,7 @@
<property name="build.dir" overwrite="false" value="bin"/>
<property name="sigarsharp" overwrite="false"
value="../../bindings/csharp/build/SigarSharp.dll"/>
<property name="examples" value="Free,CpuInfo,Df,Ifconfig"/>
<target name="clean">
<delete dir="${build.dir}"/>
@ -28,9 +29,18 @@
<target name="build" description="Build C# Sigar examples">
<mkdir dir="${build.dir}"/>
<foreach item="String" in="Free,CpuInfo,Df,Ifconfig"
<foreach item="String" in="${examples}"
delim="," property="name">
<call target="build-exe"/>
</foreach>
</target>
<!-- XXX run w/ mono on unix -->
<target name="run" description="Run C# Sigar examples">
<foreach item="String" in="${examples}"
delim="," property="name">
<echo>${name}...</echo>
<exec program="${build.dir}/${name}.exe"/>
</foreach>
</target>
</project>