sigar/bindings/dotnet/examples/default.build

47 lines
1.3 KiB
Plaintext
Raw Normal View History

2004-07-22 05:16:33 +08:00
<?xml version="1.0"?>
<!-- NAnt build file: http://sourceforge.net/projects/nant/ -->
<project name="SigarSharpExamples" default="build">
<property name="debug" value="true"/>
<property name="build.dir" overwrite="false" value="bin"/>
<property name="sigarsharp" overwrite="false"
value="../../bindings/csharp/build/SigarSharp.dll"/>
2004-09-23 01:57:17 +08:00
<property name="examples" value="Free,CpuInfo,Df,Ifconfig"/>
2004-07-22 05:16:33 +08:00
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="build-exe">
<csc target="exe" output="${build.dir}/${name}.exe" debug="${debug}">
<sources>
<include name="${name}.cs"/>
2004-07-22 05:16:33 +08:00
</sources>
<references>
<include name="${sigarsharp}"/>
2004-07-22 05:16:33 +08:00
</references>
</csc>
</target>
<target name="build" description="Build C# Sigar examples">
<mkdir dir="${build.dir}"/>
2004-09-23 01:57:17 +08:00
<foreach item="String" in="${examples}"
2004-07-22 05:16:33 +08:00
delim="," property="name">
<call target="build-exe"/>
</foreach>
</target>
2004-09-23 01:57:17 +08:00
<!-- 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>
2004-07-22 05:16:33 +08:00
</project>