use call/foreach for examples

This commit is contained in:
Doug MacEachern 2004-07-21 20:41:32 +00:00
parent e707a2d922
commit 8c5c7fad4f
1 changed files with 20 additions and 28 deletions

View File

@ -5,10 +5,29 @@
<project name="SigarSharp" default="build"> <project name="SigarSharp" default="build">
<property name="debug" value="true"/> <property name="debug" value="true"/>
<target name="clean" description="clean build files"> <target name="clean">
<delete dir="build"/> <delete dir="build"/>
</target> </target>
<target name="build-exe">
<csc target="exe" output="build/${name}.exe" debug="${debug}">
<sources>
<includes name="examples/${name}.cs"/>
</sources>
<references>
<includes name="build/SigarSharp.dll"/>
</references>
</csc>
</target>
<target name="build-examples">
<foreach item="String" in="Free,CpuInfo,Df"
delim="," property="name">
<call target="build-exe"/>
</foreach>
</target>
<target name="build" description="Build C# Sigar bindings"> <target name="build" description="Build C# Sigar bindings">
<mkdir dir="build"/> <mkdir dir="build"/>
@ -17,32 +36,5 @@
<includes name="src/Sigar.cs"/> <includes name="src/Sigar.cs"/>
</sources> </sources>
</csc> </csc>
<csc target="exe" output="build/Free.exe" debug="${debug}">
<sources>
<includes name="examples/Free.cs"/>
</sources>
<references>
<includes name="build/SigarSharp.dll"/>
</references>
</csc>
<csc target="exe" output="build/CpuInfo.exe" debug="${debug}">
<sources>
<includes name="examples/CpuInfo.cs"/>
</sources>
<references>
<includes name="build/SigarSharp.dll"/>
</references>
</csc>
<csc target="exe" output="build/Df.exe" debug="${debug}">
<sources>
<includes name="examples/Df.cs"/>
</sources>
<references>
<includes name="build/SigarSharp.dll"/>
</references>
</csc>
</target> </target>
</project> </project>