<?xml version="1.0"?>
<project name="HelloPipeline Example" default="compile-example">

	<property name="boo.dir" value="../../../build" />
	
	<target name="compile-pipeline" depends="init">	
		<booc target="library"
			output="build/HelloPipeline.dll">
			
			<sources basedir=".">
				<includes name="HelloPipeline.boo" />
			</sources>
		</booc>
	</target>
	
	<target name="compile-example" depends="compile-pipeline"> 
		<booc target="exe"
			output="build/HelloWorld.exe"
			pipeline="HelloPipeline.HelloPipeline, HelloPipeline">
			
			<sources basedir=".">
				<includes name="HelloWorld.boo" />
			</sources>
		</booc>
	</target>
	
	<target name="run" depends="compile-example">
		<exec program="build/HelloWorld.exe" useruntimeengine="true">
		</exec>
	</target>
	
	<target name="init">
		<mkdir dir="build" />
		
		<copy todir="build">
			<fileset basedir="${boo.dir}">
				<includes name="Boo.dll" />
				<includes name="Boo.Lang.Compiler.dll" />
				<includes name="Boo.AntlrParser.dll" />
				<includes name="Boo.NAnt.dll" />
				<includes name="antlr.runtime.dll" />
				<includes name="*.pdb" />
			</fileset>
		</copy>
	
		<loadtasks assembly="build/Boo.NAnt.dll" />
	</target>
	
</project>
