forked from bamboo/unityscript
-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.build
executable file
·220 lines (193 loc) · 6.53 KB
/
default.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?xml version="1.0"?>
<project name="unityscript" default="all">
<property name="java" value="java" />
<property name="build.dir" value="bin" />
<property name="boo.dir" value="../boo" />
<property name="boo.lib.dir" value="${boo.dir}/build" />
<property name="antlr.jar" value="${boo.dir}/lib/antlr-2.7.5/antlr-2.7.5.jar" />
<property name="md.bin.dir" value="../tmp/monodevelop/bin" />
<property name="debug" value="true" />
<property name="disallow.system.dll.references" value="false" />
<include buildfile="nunit.inc" />
<include buildfile="build.properties" if="${file::exists('build.properties')}" />
<target name="set-release-configuration">
<property name="debug" value="false" />
</target>
<target name="test" depends="UnityScript.Tests">
<nunit2>
<formatter type="Plain" />
<test>
<assemblies basedir="${build.dir}">
<include name="UnityScript.Tests.dll" />
</assemblies>
</test>
</nunit2>
</target>
<target name="all" depends="UnityScript.Tests, prevent-system-references">
</target>
<target name="prevent-system-references" depends="init" if="${disallow.system.dll.references}">
<boo src="prevent-system-references.boo" />
</target>
<target name="UnityScript.Tests" depends="refresh-tests, UnityScript, us">
<csc
target="library"
output="${build.dir}/UnityScript.Tests.CSharp.dll"
debug="true">
<sources basedir="src/UnityScript.Tests.CSharp">
<include name="**/*.cs" />
</sources>
<references basedir="${build.dir}">
<include name="Boo.Lang.dll" />
</references>
</csc>
<booc
target="library"
output="${build.dir}/UnityScript.Tests.dll"
debug="true">
<sources basedir="src/UnityScript.Tests">
<include name="**/*.boo" />
</sources>
<references basedir="${build.dir}">
<include name="us.exe" />
<include name="UnityScript.dll" />
<include name="UnityScript.Lang.dll" />
<include name="UnityScript.Tests.CSharp.dll" />
<include name="Boo.Lang.Compiler.dll" />
<include name="Boo.Lang.Useful.dll" />
<include name="${nunit.framework.dll}" />
</references>
</booc>
</target>
<target name="refresh-tests" depends="init">
<boo src="refresh-tests.boo" />
</target>
<target name="UnityScript" depends="init">
<uptodate property="parser.uptodate">
<sourcefiles basedir="src/UnityScript">
<include name="UnityScript.g" />
</sourcefiles>
<targetfiles basedir="src/UnityScript/Parser">
<include name="UnityScriptParser.boo" />
</targetfiles>
</uptodate>
<if test="${not parser.uptodate}">
<exec
program="${java}"
failonerror="true">
<arg value="-cp" />
<arg value="${antlr.jar}" />
<arg value="antlr.Tool" />
<!-- <arg value="-traceParser" /> -->
<arg value="-o" />
<arg value="src/UnityScript/Parser" />
<arg value="src/UnityScript/UnityScript.g" />
</exec>
<touch file="src/UnityScript/Parser/UnityScriptParser.boo" />
</if>
<booc
target="library"
output="${build.dir}/UnityScript.Lang.dll"
debug="${debug}"
noconfig="true">
<sources basedir="src/UnityScript.Lang">
<include name="**/*.boo" />
</sources>
<references basedir="${build.dir}">
<include name="Boo.Lang.Interpreter.dll" />
</references>
</booc>
<booc
target="library"
output="${build.dir}/UnityScript.dll"
debug="${debug}">
<sources basedir="src/UnityScript">
<include name="**/*.boo" />
</sources>
<references basedir="${build.dir}">
<include name="Boo.Lang.Parser.dll" />
<include name="Boo.Lang.PatternMatching.dll" />
<include name="UnityScript.Lang.dll" />
</references>
</booc>
</target>
<target name="us" depends="UnityScript">
<booc
output="${build.dir}/us.exe"
target="exe"
debug="${debug}">
<sources basedir="src/us">
<include name="*.boo" />
</sources>
<references basedir="${build.dir}">
<include name="UnityScript.dll" />
<include name="Boo.Lang.Useful.dll" />
</references>
</booc>
</target>
<target name="md" description="MonoDevelop addin" depends="us">
<booc
output="${build.dir}/UnityScript.MonoDevelop.dll"
target="library"
debug="true"
rebuild="true">
<sources basedir="src/UnityScript.MonoDevelop">
<include name="**/*.boo" />
</sources>
<references>
<include name="${build.dir}/UnityScript.dll" />
<include name="${md.bin.dir}/Mono.TextEditor.dll" />
<include name="${md.bin.dir}/MonoDevelop.*.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.SourceEditor2.dll" />
<include name="${md.bin.dir}/Mono.Debugging.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
</references>
<embed basedir="src/UnityScript.MonoDevelop">
<include name="UnityScript.MonoDevelop.addin.xml" />
<include name="UnityScriptSyntaxMode.xml" />
<include name="Templates/*.xft.xml" />
<include name="Templates/*.xpt.xml" />
<include name="Icons/*.png" />
</embed>
</booc>
<property name="dir.md.addins" value="${environment::get-folder-path('Personal')}/.config/MonoDevelop/addins/UnityScript" />
<copy todir="${dir.md.addins}">
<fileset basedir="${build.dir}">
<include name="UnityScript.MonoDevelop.*" />
</fileset>
</copy>
<copy todir="${dir.md.addins}">
<fileset basedir=".">
<include name="bin/*.*" />
<exclude name="**/*.MonoDevelop.*" />
</fileset>
</copy>
</target>
<target name="init">
<mkdir dir="${build.dir}" />
<copy todir="${build.dir}">
<fileset basedir="${boo.lib.dir}">
<include name="Boo.Lang*.dll" />
<include name="Boo.Lang*.pdb" />
<include name="Boo.Lang*.mdb" />
</fileset>
</copy>
<copy todir="${build.dir}" file="${nunit.framework.dll}" if="${file::exists(nunit.framework.dll)}" />
<loadtasks assembly="${boo.lib.dir}/Boo.NAnt.Tasks.dll" />
</target>
<target name="update-boo-libs">
<property name="boo.dir" value="../boo" unless="${property::exists('boo.dir')}" />
<nant buildfile="${boo.dir}/default.build" target="set-release-configuration nostdlib rebuild" />
<copy todir="${boo.lib.dir}">
<fileset basedir="${boo.dir}/build">
<include name="*.dll" />
<include name="*.exe" />
</fileset>
</copy>
<copy file="${boo.dir}/lib/antlr-2.7.5/antlr-2.7.5.jar" todir="lib" />
</target>
<target name="clean">
<delete dir="${build.dir}" if="${directory::exists(build.dir)}" />
</target>
<target name="rebuild" depends="clean, all" />
</project>