Welcome to mirror list, hosted at ThFree Co, Russian Federation.

corlib.build « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 75dfd3403706aeeb1dbb8b4866dbb5c2333724be (plain)
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
<?xml version="1.0" encoding="iso-8859-1"?>

<!-- NAnt build file for corlib.dll -->
<!-- Target windows builds libraries _for_ windows -->
<!-- Target linux builds libraries _for_ linux -->

<project name="corlib" default="build">
	<property name="debug" value="true"/>
	<property name="verbose" value="true"/>

	<target name="build">
		<mkdir dir="../lib"/>
		<csc target="library" output="../lib/corlib.dll" debug="${debug}">
			<!-- keep in sync with corlib_cmp.dll below -->
			<arg value="/nowarn:1595"/>
			<arg value="/nowarn:0649"/> <!-- field never assigned to -->
			<arg value="/nowarn:0169"/> <!-- field never used -->
			<arg value="/nowarn:0679"/> <!-- internal may be overriden -->
			<arg value="/unsafe"/>

			<arg value="/nostdlib"/> 	<!-- don't reference mscorlib -->
			<arg value="/noconfig"/>	<!-- don't reference ms assemblies -->

			<sources>
				<includes name="**/*.cs"/>

				<excludes name="Test/**"/>
				<excludes name="System.Security.Permissions/SecurityPermissionAttribute.cs"/>	<!-- custom security attributes problem -->

				<excludes name="Unix/**"/>
				<excludes name="Linux/**"/>
				<excludes name="Windows/**"/>
				<excludes name="System.PAL/**"/>
			</sources>
		</csc>
		<csc target="library" output="../lib/corlib_cmp.dll" debug="${debug}">
			<!-- This dll is used to compare with mscorlib -->
			<!-- It should be the same as corlib.dll minus Object and ValueTyp -->
			<arg value="/nowarn:1595"/>
			<arg value="/nowarn:0649"/> <!-- field never assigned to -->
			<arg value="/nowarn:0169"/> <!-- field never used -->
			<arg value="/nowarn:0679"/> <!-- internal may be overriden -->
			<arg value="/unsafe"/>

			<arg value="/nostdlib"/>
			<arg value="/noconfig"/>
			<arg value="/r:mscorlib.dll"/>
			
			<sources>
				<includes name="**/*.cs"/>

				<excludes name="Test/**"/>
				<excludes name="System.Security.Permissions/SecurityPermissionAttribute.cs"/>

				<excludes name="Unix/**"/>
				<excludes name="Linux/**"/>
				<excludes name="Windows/**"/>
				<excludes name="System.PAL/**"/>

				<excludes name="System/Object.cs"/>
				<excludes name="System/ValueType.cs"/>
				<excludes name="System/Enum.cs"/>
				<excludes name="System/Delegate.cs"/>
				<excludes name="System/MulticastDelegate.cs"/>
				<excludes name="System/Exception.cs"/>
			</sources>
		</csc>
		<!-- NUnit can only run under windows right now, so build for windows
			even though this is inside the linux target -->
		<csc target="library" output="Test/corlib_res.dll" debug="${debug}">
			<arg value="/nowarn:1595"/>
			<arg value="/nowarn:0649"/> <!-- field never assigned to -->
			<arg value="/nowarn:0169"/> <!-- field never used -->
			<arg value="/nowarn:0679"/> <!-- internal may be overriden -->
			<arg value="/unsafe"/>
			<sources>
				<includes name="**/*.cs"/>

				<excludes name="Test/**"/>

				<excludes name="Unix/**"/>
				<excludes name="Linux/**"/>
				<excludes name="Windows/**"/>
				<excludes name="System.PAL/**"/>

				<excludes name="System/Object.cs"/>
				<excludes name="System/ValueType.cs"/>
				<excludes name="System/Enum.cs"/>
				<excludes name="System/Delegate.cs"/>
				<excludes name="System/MulticastDelegate.cs"/>
				<excludes name="System/Exception.cs"/>
				<excludes name="System/Type.cs"/>
				<excludes name="System/MonoType.cs"/>
				<excludes name="System/Array.cs"/>
				<excludes name="System/String.cs"/>
				<excludes name="System/Console.cs"/>
				<excludes name="System/AppDomain.cs"/>
				<excludes name="System/RuntimeTypeHandle.cs"/>
				<excludes name="System/ICloneable.cs"/>

				<excludes name="System.Collections/Queue.cs"/>
				<excludes name="System.Collections/ICollection.cs"/>
				<excludes name="System.Collections/IEnumerator.cs"/>
				<excludes name="System.Collections/IEnumerable.cs"/>
				<excludes name="System.Collections/IList.cs"/>
				<excludes name="System.PAL/IOperatingSystem.cs"/>
				<excludes name="System.Reflection.Emit/**"/>
				<excludes name="System.Runtime.CompilerServices/**"/>
				<excludes name="System.Security.Permissions/SecurityPermissionAttribute.cs"/>
			</sources>
		</csc>
		<nant basedir="Test" target="build"/>
	</target>

	<target name="mcs-build">
		<mkdir dir="../lib"/>

		<mcs target="library" output="../lib/corlib_mcs.dll" debug="false" verbose="${verbose}">
			<arg value="--unsafe"/>

			<arg value="--nostdlib"/> 	<!-- don't reference mscorlib -->
			<arg value="--noconfig"/>	<!-- don't reference ms assemblies -->

			<sources>
				<includes name="**/*.cs"/>

				<excludes name="Test/**"/>
				<excludes name="System.Security.Permissions/SecurityPermissionAttribute.cs"/>	<!-- custom security attributes problem -->

				<excludes name="Unix/**"/>
				<excludes name="Linux/**"/>
				<excludes name="Windows/**"/>
				<excludes name="System.PAL/**"/>
			</sources>
		</mcs>

	</target>

	<target name="test" depends="build">
		<nant basedir="Test" target="test"/>
	</target>

	<target name="clean">
		<delete file="../lib/corlib.dll" failonerror="false"/>
		<delete file="../lib/corlib.pdb" failonerror="false"/>
		<delete file="../lib/corlib_cmp.dll" failonerror="false"/>
		<delete file="../lib/corlib_cmp.pdb" failonerror="false"/>
		<delete file="Test/corlib_res.dll" failonerror="false"/>
		<delete file="Test/corlib_res.pdb" failonerror="false"/>
		<nant basedir="Test" target="clean"/>
	</target>
</project>