1 <project name="Generator" default="build">
\r
2 <loadtasks assembly="lib/Boo.NAnt.Tasks.dll" />
\r
5 <target name="build" description="Builds the app" depends="prepare">
\r
6 <property name="type" value="exe" overwrite="false" />
\r
7 <property name="target" value="${type}" />
\r
8 <property name="target" value="library" if="${type == 'dll'}" />
\r
10 <booc target="${target}"
\r
11 output="bin/generate.${type}"
\r
13 <sources basedir="src/app">
\r
14 <include name="**/*.boo" />
\r
16 <references basedir="bin">
\r
17 <include name="Boo.Lang.Compiler.dll" />
\r
18 <include name="Boo.Lang.Parser.dll" />
\r
19 <include name="Boo.Lang.Useful.dll" />
\r
20 <include name="MGutz.CodeInjection.dll" />
\r
25 <target name="prepare" description="Copy libs to the build dir">
\r
28 <fileset basedir="lib">
\r
29 <include name="*.*" />
\r
34 <target name="build.tests" description="Builds the test lib" depends="build">
\r
35 <booc target="library"
\r
36 output="bin/tests.dll"
\r
39 <sources basedir="src/test">
\r
40 <include name="**/*.boo" />
\r
42 <references basedir="bin">
\r
43 <include name="nunit.framework.dll" />
\r
44 <include name="generate.exe" />
\r
49 <target name="clean" description="Sweep it yeah!">
\r
52 <include name="bin/**" />
\r
57 <target name="install" description="Installs the application" depends="build">
\r
58 <if test="${platform::is-win32()}">
\r
59 <property name="to" value="${environment::get-folder-path('System')}\.." overwrite="false" />
\r
60 <copy todir="${to}">
\r
61 <fileset basedir="script">
\r
62 <include name="monorail.bat" />
\r
63 <include name="generate.bat" />
\r
67 <token key="CD" value="${project::get-base-directory()}" />
\r
72 <if test="${platform::is-unix()}">
\r
73 <property name="to" value="/usr/bin" overwrite="false" />
\r
74 <copy todir="${to}">
\r
75 <fileset basedir="script">
\r
76 <include name="monorail" />
\r
77 <include name="generate" />
\r
81 <token key="CD" value="${project::get-base-directory()}" />
\r
85 <exec program="chmod">
\r
86 <arg line="+x ${to}/monorail" />
\r
88 <exec program="chmod">
\r
89 <arg line="+x ${to}/generate" />
\r
94 <target name="test" description="Run tests" depends="build.tests">
\r
95 <nunit2 if="${platform::is-win32()}">
\r
96 <formatter type="Plain" />
\r
97 <test assemblyname="bin/tests.dll" />
\r
99 <exec program="nunit-console" if="${platform::is-unix()}">
\r
100 <arg line="bin/tests.dll /nologo" />
\r
104 <target name="test.unit" description="Run unit tests" depends="build.tests">
\r
105 <exec program="nunit-console" if="${platform::is-unix()}">
\r
106 <arg line="bin/tests.dll /include:Unit /nologo" />
\r
110 <target name="test.functional" description="Run functional tests" depends="build.tests">
\r
111 <exec program="nunit-console" if="${platform::is-unix()}">
\r
112 <arg line="bin/tests.dll /include:Functional /nologo" />
\r