forked from boo-lang/boo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
micro-profile.build
executable file
·59 lines (42 loc) · 1.68 KB
/
micro-profile.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
<?xml version="1.0"?>
<project name="boo micro profile" default="test" description="Boo.Lang.dll with no System.Reflection.Emit references">
<!--
Micro profile currently means no System.Reflection.Emit dependencies for Boo.Lang.
The following symbols are defined when compiling for the micro profile:
NO_SYSTEM_REFLECTION_EMIT
-->
<property name="cecil.dir" value="external/cecil" />
<property name="csc.define.custom" value="NO_SYSTEM_REFLECTION_EMIT" />
<target name="test" depends="verify-Boo.Lang.dll">
<nant buildfile="default.build" target="test" inheritall="true" />
</target>
<target name="Boo.Lang">
<nant buildfile="default.build" inheritall="true" />
</target>
<target name="verify-Boo.Lang.dll" depends="Mono.Cecil, Boo.Lang">
<boo>
<references basedir="${cecil.dir}/bin/Debug">
<include name="Mono.Cecil.dll" />
</references>
<code>
import Mono.Cecil
booLang = ModuleDefinition.ReadModule("build/Boo.Lang.dll")
assert not booLang.HasTypeReference("System.Reflection.Emit.ILGenerator")
assert "System.Core" not in [assemblyRef.Name for assemblyRef in booLang.AssemblyReferences]
</code>
</boo>
</target>
<target name="Mono.Cecil" depends="checkout-Mono.Cecil">
<property name="xbuild" value="xbuild" />
<property name="xbuild" value="msbuild" if="${platform::is-win32()}" />
<exec program="${xbuild}">
<arg file="${cecil.dir}/Mono.Cecil.csproj" />
<arg value="-property:OutputPath=bin/Debug" />
</exec>
</target>
<target name="checkout-Mono.Cecil" unless="${directory::exists(cecil.dir)}">
<exec program="git">
<arg line="clone git://github.com/jbevain/cecil.git ${cecil.dir}" />
</exec>
</target>
</project>