2002-01-14 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / class / corlib / corlib.build
1 <?xml version="1.0" encoding="iso-8859-1"?>
2
3 <!-- NAnt build file for corlib.dll -->
4 <!-- Target windows builds libraries _for_ windows -->
5 <!-- Target linux builds libraries _for_ linux -->
6
7 <project name="corlib" default="linux">
8         <property name="debug" value="true"/>
9
10         <target name="linux">
11                 <mkdir dir="../lib"/>
12                 <csc target="library" output="../lib/corlib.dll" debug="${debug}">
13                         <!-- keep in sync with corlib_cmp.dll below -->
14                         <arg value="/nowarn:1595"/>
15                         <arg value="/nowarn:0649"/> <!-- field never assigned to -->
16                         <arg value="/nowarn:0169"/> <!-- field never used -->
17                         <arg value="/unsafe"/>
18                         <sources>
19                                 <includes name="**/*.cs"/>
20                                 <excludes name="Test/**"/>
21                                 <excludes name="Windows/**"/>
22                                 <excludes name="System.Security.Permissions/SecurityPermissionAttribute.cs"/>
23                                 <excludes name="System.PAL/IOperatingSystem.cs"/>
24                         </sources>
25                 </csc>
26                 <csc target="library" output="../lib/corlib_cmp.dll" debug="${debug}">
27                         <!-- This dll is used to compare with mscorlib -->
28                         <!-- It should be the same as corlib.dll minus Object and ValueTyp -->
29                         <arg value="/nowarn:1595"/>
30                         <arg value="/nowarn:0649"/> <!-- field never assigned to -->
31                         <arg value="/nowarn:0169"/> <!-- field never used -->
32                         <arg value="/unsafe"/>
33                         <sources>
34                                 <includes name="**/*.cs"/>
35                                 <excludes name="Test/**"/>
36                                 <excludes name="Windows/**"/>
37                                 <excludes name="System.Security.Permissions/SecurityPermissionAttribute.cs"/>
38                                 <excludes name="System.PAL/IOperatingSystem.cs"/>
39                                 <excludes name="System/Object.cs" />
40                                 <excludes name="System/ValueType.cs" />
41                         </sources>
42                 </csc>
43                 <!-- NUnit can only run under windows right now, so build for windows
44                         even though this is inside the linux target -->
45                 <csc target="library" output="Test/corlib_res.dll" debug="${debug}">
46                         <arg value="/nowarn:1595"/>
47                         <arg value="/nowarn:0649"/> <!-- field never assigned to -->
48                         <arg value="/nowarn:0169"/> <!-- field never used -->
49                         <arg value="/unsafe"/>
50                         <sources>
51                                 <includes name="**/*.cs"/>
52                                 <excludes name="Test/**"/>
53                                 <excludes name="Linux/**"/>
54                                 <excludes name="System/Object.cs"/>
55                                 <excludes name="System/ValueType.cs"/>
56                                 <excludes name="System/Type.cs"/>
57                                 <excludes name="System/MonoType.cs"/>
58                                 <excludes name="System/Array.cs"/>
59                                 <excludes name="System/String.cs"/>
60                                 <excludes name="System/Console.cs"/>
61                                 <excludes name="System/AppDomain.cs"/>
62                                 <excludes name="System.Reflection.Emit/**"/>
63                                 <excludes name="System/RuntimeTypeHandle.cs"/>
64                                 <excludes name="System.PAL/IOperatingSystem.cs"/>
65                                 <excludes name="System.Collections/Queue.cs"/>
66                                 <excludes name="System.Security.Permissions/SecurityPermissionAttribute.cs"/>
67                         </sources>
68                 </csc>
69                 <nant basedir="Test" target="build"/>
70         </target>
71
72         <target name="test" depends="linux">
73                 <nant basedir="Test" target="test"/>
74         </target>
75
76         <target name="windows">
77                 <mkdir dir="../lib"/>
78                 <csc target="library" output="../lib/corlib.dll" debug="${debug}">
79                         <arg value="/nowarn:1595"/>
80                         <arg value="/nowarn:0649"/> <!-- field never assigned to -->
81                         <arg value="/nowarn:0169"/> <!-- field never used -->
82                         <arg value="/unsafe"/>
83                         <sources>
84                                 <includes name="**/*.cs"/> 
85                                 <excludes name="Test/**"/>
86                                 <excludes name="Linux/**"/>
87                                 <excludes name="System.PAL/IOperatingSystem.cs"/>
88                         </sources>
89                 </csc>
90                 <csc target="library" output="Test/corlib_res.dll" debug="${debug}">
91                         <arg value="/nowarn:1595"/>
92                         <arg value="/nowarn:0649"/> <!-- field never assigned to -->
93                         <arg value="/nowarn:0169"/> <!-- field never used -->
94                         <arg value="/unsafe"/>
95                         <sources>
96                                 <includes name="**/*.cs"/>
97                                 <excludes name="Test/**"/>
98                                 <excludes name="Linux/**"/>
99                                 <excludes name="System/Object.cs"/>
100                                 <excludes name="System/ValueType.cs"/>
101                                 <excludes name="System/Type.cs"/>
102                                 <excludes name="System/Array.cs"/>
103                                 <excludes name="System/String.cs"/>
104                                 <excludes name="System/Console.cs"/>
105                                 <excludes name="System/AppDomain.cs"/>
106                                 <excludes name="System.Reflection.Emit/**"/>
107                                 <excludes name="System/RuntimeTypeHandle.cs"/>
108                                 <excludes name="System.PAL/IOperatingSystem.cs"/>
109                                 <excludes name="System.Collections/Queue.cs"/>
110                                 <excludes name="System.Security/CodeAccessPermission.cs"/>
111                         </sources>
112                 </csc>
113                 <nant basedir="Test" target="build"/>
114         </target>
115
116         <target name="clean">
117                 <delete file="../lib/corlib.dll" failonerror="false"/>
118                 <delete file="../lib/corlib.pdb" failonerror="false"/>
119                 <delete file="../lib/corlib_cmp.dll" failonerror="false"/>
120                 <delete file="../lib/corlib_cmp.pdb" failonerror="false"/>
121                 <delete file="Test/corlib_res.dll" failonerror="false"/>
122                 <delete file="Test/corlib_res.pdb" failonerror="false"/>
123                 <nant basedir="Test" target="clean"/>
124         </target>
125 </project>