~nunit-core/nunitv2/2.5

« back to all changes in this revision

Viewing changes to nunit.build.include

  • Committer: charliepoole
  • Date: 2008-02-23 03:26:05 UTC
  • Revision ID: vcs-imports@canonical.com-20080223032605-y413yp2ckipdsd1s
Move non-source files like scripts to the root directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<project name="NUnit" default="build" basedir=".">
 
3
 
 
4
<!-- ***************************************************************** -->
 
5
<!-- **********Set Properties used by Various targets **************** -->
 
6
<!-- ***************************************************************** -->
 
7
 
 
8
  <!-- Project base dir is nant project base dir -->
 
9
  <property name="project.base.dir"
 
10
    value="${project::get-base-directory()}"/>
 
11
 
 
12
  <!-- Other directories are derived from base dir -->
 
13
  <property name="project.build.dir" 
 
14
    value="${path::combine(project.base.dir,'build')}"/>
 
15
  <property name="project.package.dir" 
 
16
    value="${path::combine(project.base.dir,'package')}"/>
 
17
  <property name="project.src.dir"
 
18
    value="${path::combine(project.base.dir, 'src')}"/>
 
19
  <property name="project.doc.dir"
 
20
    value="${path::combine(project.base.dir,'doc')}"/>
 
21
  <property name="project.samples.dir"
 
22
    value="${path::combine(project.base.dir,'samples')}"/>
 
23
  <property name="project.solutions.dir"
 
24
    value="${path::combine(project.base.dir,'solutions')}"/>
 
25
  <property name="project.tools.dir"
 
26
    value="${path::combine(project.base.dir,'tools')}"/>
 
27
  <property name="project.lib.dir"
 
28
    value="${path::combine(project.base.dir,'lib')}"/>
 
29
  <property name="project.install.dir"
 
30
    value="${path::combine(project.src.dir, 'install')}"/>
 
31
 
 
32
  <!-- Package directories -->
 
33
  <property name="package.working.dir" 
 
34
    value="${path::combine(project.package.dir,package.name)}"/>
 
35
  <property name="package.bin.dir" 
 
36
    value="${path::combine(package.working.dir,'bin')}"/>
 
37
  <property name="package.doc.dir" 
 
38
    value="${path::combine(package.working.dir,'doc')}"/>
 
39
  <property name="package.samples.dir" 
 
40
    value="${path::combine(package.working.dir,'samples')}"/>
 
41
  <property name="package.src.dir" 
 
42
    value="${path::combine(package.working.dir,'src')}"/>
 
43
  <property name="package.solutions.dir"
 
44
    value="${path::combine(package.working.dir, 'solutions')}"/>
 
45
  <property name="package.tools.dir"
 
46
    value="${path::combine(package.working.dir,'tools')}"/>
 
47
  <property name="package.resource.dir"
 
48
    value="${path::combine(package.working.dir, 'resources')}"/>
 
49
  <property name="package.install.dir"
 
50
    value="${path::combine(package.src.dir, 'install')}"/>
 
51
 
 
52
  <!-- Default build configuration -->
 
53
  <property name="build.config" value="debug"/>
 
54
  <property name="build.defines" value=""/>
 
55
 
 
56
  <!-- Default runtime configuration -->
 
57
  <foreach item="String" delim="," 
 
58
      property="framework" in="${supported.frameworks}">
 
59
    <if test="${framework::sdk-exists( framework )}">
 
60
      <property name="installed.frameworks" value="${installed.frameworks},${framework}"
 
61
        if="${property::exists('installed.frameworks')}"/>
 
62
      <property name="installed.frameworks" value="${framework}"
 
63
        unless="${property::exists('installed.frameworks')}"/>
 
64
      <property name="default.runtime" value="${framework}"
 
65
        unless="${property::exists('default.runtime')}"/>
 
66
      <property name="default.net.runtime" value="${framework}"
 
67
        if="${string::starts-with(framework,'net')}"
 
68
        unless="${property::exists('default.net.runtime')}"/>
 
69
      <property name="default.mono.runtime" value="${framework}"
 
70
        if="${string::starts-with(framework,'mono')}"
 
71
        unless="${property::exists('default.mono.runtime')}"/>
 
72
    </if>
 
73
  </foreach>
 
74
 
 
75
  <call target="set-${default.runtime}-runtime-config" />
 
76
 
 
77
<!-- ***************************************************************** -->
 
78
<!-- ********* Targets for setting the build configuration *********** -->
 
79
<!-- ***************************************************************** -->
 
80
 
 
81
  <target name="set-build-config" description="Set the build config">
 
82
    <call target="set-${build.config}-build-config"/>
 
83
  </target>
 
84
 
 
85
  <target name="set-debug-build-config">
 
86
    <property name="build.config" value="debug"/>
 
87
    <property name="build.debug" value="true"/>
 
88
    <property name="build.defines" value="DEBUG,TRACE,${runtime.defines}"
 
89
        dynamic="true"/>
 
90
    <property name="build.suffix" value="-dbg"/>
 
91
  </target>
 
92
        
 
93
  <target name="set-release-build-config">
 
94
    <property name="build.config" value="release"/>
 
95
    <property name="build.debug" value="false"/>
 
96
    <property name="build.defines" value="TRACE,${runtime.defines}"
 
97
        dynamic="true"/>
 
98
    <property name="build.suffix" value=""/>
 
99
  </target>
 
100
 
 
101
<!-- ***************************************************************** -->
 
102
<!-- ***    Targets for setting the runtime configuration          *** -->
 
103
<!-- ***************************************************************** -->
 
104
 
 
105
  <target name="set-runtime-config">   
 
106
    <call target="set-${runtime.config}-runtime-config"/>
 
107
  </target>
 
108
  
 
109
  <target name="set-default-dot-net-runtime-config">
 
110
    <fail unless="${property::exists( 'default.net.runtime' )}"
 
111
      message="No versions of the .NET SDK were found"/>
 
112
 
 
113
    <call target="set-${default.net.runtime}-runtime-config" />
 
114
  </target>
 
115
 
 
116
  <target name="set-default-mono-runtime-config">
 
117
    <fail unless="${property::exists( 'default.mono.runtime' )}"
 
118
      message="No versions of the Mono runtime were found"/>
 
119
 
 
120
    <call target="set-${default.mono.runtime}-runtime-config" />
 
121
  </target>
 
122
 
 
123
  <target name="set-net-1.0-runtime-config">
 
124
    <fail unless="${framework::sdk-exists( 'net-1.0' )}"
 
125
      message="The .NET 1.0 SDK is not configured or not installed"/>
 
126
 
 
127
    <property name="runtime.platform" value="net"/>
 
128
    <property name="runtime.version" value="1.0"/>
 
129
    <property name="runtime.config" value="net-1.0"/>
 
130
    <property name="runtime.defines" value="NET,NET_1_0"/>
 
131
    <property name="build.mono" value="false"/>
 
132
    <property name="build.win32" value="true"/>
 
133
    <property name="build.x86" value="false"/>
 
134
    <property name="nant.settings.currentframework" 
 
135
      value="net-1.0"/>
 
136
    <property name="supported.test.platforms" 
 
137
      value="net-1.0,net-1.1,net-2.0,mono-1.0,mono-2.0"/>
 
138
  </target>
 
139
        
 
140
  <target name="set-net-1.1-runtime-config">
 
141
    <property name="runtime.platform" value="net"/>
 
142
    <fail unless="${framework::sdk-exists( 'net-1.1' )}"
 
143
      message="The .NET 1.1 SDK is not configured or not installed"/>
 
144
 
 
145
    <property name="runtime.platform" value="net"/>
 
146
    <property name="runtime.version" value="1.1"/>
 
147
    <property name="runtime.config" value="net-1.1"/>
 
148
    <property name="runtime.defines" value="NET,NET_1_1"/>
 
149
    <property name="build.mono" value="false"/>
 
150
    <property name="build.win32" value="true"/>
 
151
    <property name="build.x86" value="false"/>
 
152
    <property name="nant.settings.currentframework" 
 
153
      value="net-1.1"/>
 
154
    <property name="supported.test.platforms"
 
155
      value="net-1.0,net-1.1,net-2.0,mono-1.0,mono-2.0"/>
 
156
  </target>
 
157
        
 
158
  <target name="set-net-2.0-runtime-config">
 
159
    <fail unless="${framework::sdk-exists( 'net-2.0' )}"
 
160
      message="The .NET 2.0 SDK is not configured or not installed"/>
 
161
 
 
162
    <property name="runtime.platform" value="net"/>
 
163
    <property name="runtime.version" value="2.0"/>
 
164
    <property name="runtime.config" value="net-2.0"/>
 
165
    <property name="runtime.defines" value="NET,NET_2_0"/>
 
166
    <property name="build.mono" value="false"/>
 
167
    <property name="build.win32" value="true"/>
 
168
    <property name="build.x86" value="true"/>
 
169
    <property name="nant.settings.currentframework" 
 
170
      value="net-2.0"/>
 
171
    <property name="supported.test.platforms" value="net-2.0,mono-2.0"/>
 
172
  </target>
 
173
        
 
174
  <target name="set-mono-1.0-runtime-config">
 
175
    <fail unless="${framework::sdk-exists( 'mono-1.0' )}"
 
176
      message="The Mono 1.0 SDK is not configured or not installed"/>
 
177
 
 
178
    <property name="runtime.platform" value="mono"/>
 
179
    <property name="runtime.version" value="1.0"/>
 
180
    <property name="runtime.config" value="mono-1.0"/>
 
181
    <property name="runtime.defines" value="MONO,MONO_1_0"/>
 
182
    <property name="build.mono" value="true"/>
 
183
    <property name="build.win32" value="false"/>
 
184
    <property name="build.x86" value="false"/>
 
185
    <property name="nant.settings.currentframework" 
 
186
      value="mono-1.0"/>
 
187
    <property name="supported.test.platforms"
 
188
      value="mono-1.0,mono-2.0,net-1.0,net-1.1,net-2.0"/>
 
189
  </target>
 
190
 
 
191
  <target name="set-mono-2.0-runtime-config">
 
192
    <fail unless="${framework::sdk-exists( 'mono-2.0' )}"
 
193
      message="The Mono 2.0 SDK is not configured or not installed"/>
 
194
 
 
195
    <property name="runtime.platform" value="mono"/>
 
196
    <property name="runtime.version" value="2.0"/>
 
197
    <property name="runtime.config" value="mono-2.0"/>
 
198
    <property name="runtime.defines" value="MONO,MONO_2_0"/>
 
199
    <property name="build.mono" value="true"/>
 
200
    <property name="build.win32" value="false"/>
 
201
    <property name="build.x86" value="true"/>
 
202
    <property name="nant.settings.currentframework" 
 
203
      value="mono-2.0"/>
 
204
    <property name="supported.test.platforms" value="mono-2.0,net-2.0"/>
 
205
  </target>
 
206
 
 
207
<!-- ***************************************************************** -->
 
208
<!-- **************** Internally used targets ************************ -->
 
209
<!-- ***************************************************************** -->
 
210
 
 
211
  <!-- Set up the build directory -->
 
212
  <target name="set-build-dir"
 
213
    depends="set-build-config,set-runtime-config">
 
214
    <property name="runtime.platform.dir"
 
215
      value="${path::combine(project.build.dir,runtime.platform)}"/>
 
216
    <property name="runtime.version.dir"
 
217
      value="${path::combine(runtime.platform.dir,runtime.version)}"/>
 
218
    <property name="current.build.dir" 
 
219
      value="${path::combine(runtime.version.dir,build.config)}"/>
 
220
  </target>
 
221
  
 
222
  <target name="make-build-dir" depends="set-build-dir">
 
223
    <mkdir dir="${current.build.dir}"
 
224
      unless="${directory::exists(current.build.dir)}"/>
 
225
  </target>
 
226
 
 
227
<!-- ***************************************************************** -->
 
228
<!-- ***           Dump configuration settings for debugging       *** -->
 
229
<!-- ***************************************************************** -->
 
230
 
 
231
  <target name="dump-settings" depends="set-build-dir">
 
232
 
 
233
    <echo>Project Directories</echo>
 
234
    <echo>  Base:      ${project.base.dir}</echo>
 
235
    <echo>   Doc:      ${project.doc.dir}</echo>
 
236
    <echo>   Samples:  ${project.samples.dir}</echo>
 
237
    <echo>   Source:   ${project.src.dir}</echo>
 
238
    <echo>   Build:    ${project.build.dir}</echo>
 
239
    <echo>   Package:  ${project.package.dir}</echo>
 
240
    <echo>   Tools:    ${project.tools.dir}</echo>
 
241
    <echo></echo>
 
242
    <echo>Runtime Versions</echo>
 
243
    <echo>  Supported: ${supported.frameworks}</echo>
 
244
    <echo>  Installed: ${installed.frameworks}</echo>
 
245
    <echo>  Default:   ${default.runtime}</echo>
 
246
    <echo>    .Net:    ${default.net.runtime}</echo>
 
247
    <echo>    Mono:    ${default.mono.runtime}</echo>
 
248
    <echo></echo>
 
249
    <echo>Current Build Settings</echo>
 
250
    <echo>  Config:    ${build.config}</echo>
 
251
    <echo>  Runtime:   ${runtime.config}</echo>
 
252
    <echo>  Build Dir: ${current.build.dir}</echo>
 
253
    <echo>  Defines:   ${build.defines}</echo>
 
254
    <echo></echo>
 
255
    <echo>Test Platforms for Current Build</echo>
 
256
    <echo>  Supported: ${supported.test.platforms}</echo>
 
257
    <echo></echo>
 
258
    <echo>Packaging</echo>
 
259
    <echo>  Name:      ${package.name}</echo>
 
260
    <echo>  Version:   ${package.version}</echo>
 
261
    <echo>  Work Dir:  ${package.working.dir}</echo>
 
262
    <echo>   Bin:      ${package.bin.dir}</echo>
 
263
    <echo>   Doc:      ${package.doc.dir}</echo>
 
264
    <echo>   Samples:  ${package.samples.dir}</echo>
 
265
    <echo>   Source:   ${package.src.dir}</echo>
 
266
    <echo></echo>
 
267
    <echo>Current Framework and SDK Directories</echo>
 
268
    <echo>  ${framework::get-framework-directory(framework::get-target-framework())}</echo>
 
269
    <echo>  ${framework::get-sdk-directory(framework::get-target-framework())}</echo>
 
270
 
 
271
  </target>
 
272
 
 
273
</project>
 
 
b'\\ No newline at end of file'