-
Notifications
You must be signed in to change notification settings - Fork 89
/
NemerleAll.nproj
550 lines (500 loc) · 39.2 KB
/
NemerleAll.nproj
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<Project DefaultTargets="DevBuild2Stage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<UsingTask TaskName="MSBuild.Community.Tasks.FileUpdate" AssemblyFile="$(MSBuildProjectDirectory)\ExternalDependences\MSBuild.Community.Tasks.dll" />
<PropertyGroup>
<UseMSBuild Condition="Exists('$(MSBuildBinPath)\msbuild.exe')">1</UseMSBuild>
<ExeRunner Condition=" '$(OS)' == 'Windows_NT' "></ExeRunner>
<ExeRunner Condition=" '$(OS)' != 'Windows_NT' ">mono </ExeRunner>
</PropertyGroup>
<PropertyGroup Condition=" '$(NTargetName)' == '' ">
<NTargetName Condition="'$(UseMSBuild)' != ''">Rebuild</NTargetName>
<NTargetName Condition="'$(UseMSBuild)' == ''">Build</NTargetName>
</PropertyGroup>
<PropertyGroup Condition=" '$(NInstall)' == '' ">
<!--Folder for Nemerle installation. To install use "Install" target.-->
<NInstall Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">$(ProgramFiles)\Nemerle\Net-3.5</NInstall>
<NInstall Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">$(ProgramFiles)\Nemerle\Net-4.0</NInstall>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<!--Path to root directory of Nemerle sources.-->
<NRoot>$(MSBuildProjectDirectory)</NRoot>
<NPrefix Condition="'$(UseMSBuild)' != ''">net</NPrefix>
<NPrefix Condition="'$(UseMSBuild)' == ''">mono</NPrefix>
<NVer Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">$(NPrefix)-3.5</NVer>
<NVer Condition="'$(TargetFrameworkVersion)' == 'v4.0'">$(NPrefix)-4.0</NVer>
<NVer Condition="'$(TargetFrameworkVersion)' == 'v4.5'">$(NPrefix)-4.5</NVer>
<NVer Condition="'$(TargetFrameworkVersion)' == 'v4.5.1'">$(NPrefix)-4.5.1</NVer>
<!-- Original boot -->
<NRootBoot Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">$(NRoot)\boot\</NRootBoot>
<NRootBoot Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">$(NRoot)\boot-4.0\</NRootBoot>
<!--Path to stages output directory (including current configuration subfolder).-->
<NBin>$(NRoot)\bin\$(Configuration)\$(NVer)</NBin>
<NObj>$(NRoot)\obj\$(Configuration)\$(NVer)</NObj>
<!--Path to boot compiler.-->
<NBoot>$(NBin)\boot\</NBoot>
<!-- Project Constants -->
<NInstallIntegration Condition=" '$(NInstallIntegration)' == '' ">False</NInstallIntegration>
</PropertyGroup>
<PropertyGroup Condition="'$(UseMSBuild)' != ''">
<NProjectConstants Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">RUNTIME_MS</NProjectConstants>
<NProjectConstants Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">RUNTIME_MS;NET_4_0</NProjectConstants>
<NProjectConstants Condition="'$(Configuration)' == 'Debug'">$(NProjectConstants);DEBUG</NProjectConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(UseMSBuild)' == ''">
<NProjectConstants Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">RUNTIME_MONO=1</NProjectConstants>
<NProjectConstants Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">RUNTIME_MONO=1;NET_4_0=1</NProjectConstants>
<NProjectConstants Condition="'$(Configuration)' == 'Debug'">$(NProjectConstants);DEBUG=1</NProjectConstants>
</PropertyGroup>
<PropertyGroup>
<NDefineProjectConstants>DefineConstants=$(NProjectConstants)</NDefineProjectConstants>
</PropertyGroup>
<!--Project required to build any Nemerle project (.nproj)-->
<ItemGroup Condition="'$(UseMSBuild)' != ''">
<NTasksProject Include="$(NRoot)\Nemerle.MSBuild.Tasks.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(UseMSBuild)' == ''">
<NTasksProject Include="$(NRoot)\Nemerle.XBuild.Tasks.csproj" />
</ItemGroup>
<ItemGroup>
<CSharpCompilerFiles Include ="$(NBin)\PowerPack\CSharpParser.dll;$(NBin)\PowerPack\ncc.parser.csharp.dll;$(NBin)\PowerPack\Nemerle.Peg.dll"/>
</ItemGroup>
<!--Projects related only to compiler.-->
<ItemGroup>
<NCompilerProject Include="$(NRoot)\Nemerle.nproj" />
<NCompilerProject Include="$(NRoot)\Nemerle.Compiler.nproj" />
<NCompilerProject Include="$(NRoot)\Nemerle.Macros.nproj" />
<NCompilerProject Include="$(NRoot)\ncc.nproj" />
<NCompilerProject Include="$(NRoot)\ncc32.nproj" />
<NCompilerProject Include="$(NRoot)\ncc64.nproj" Condition="'$(PROCESSOR_ARCHITECTURE)' == 'AMD64' Or '$(PROCESSOR_ARCHITEW6432)' == 'AMD64'" />
</ItemGroup>
<!-- Compiler test projects and Nemerle.Diff -->
<ItemGroup>
<NTestFramework Include="$(NRoot)\snippets\Nemerle.Test\Nemerle.Test.Framework\Nemerle.Test.Framework.nproj" />
<NTestFramework Include="$(NRoot)\snippets\Nemerle.Test\Nemerle.Compiler.Test\Nemerle.Compiler.Test.nproj" />
<NTestFramework Include="$(NRoot)\snippets\Nemerle.Diff\Nemerle.Diff\Nemerle.Diff.nproj" />
<NTestFramework Include="$(NRoot)\snippets\Nemerle.Diff\Nemerle.Diff.Tests\Nemerle.Diff.Tests.nproj" />
</ItemGroup>
<!--Projects related to Nemerle.Peg-->
<ItemGroup>
<NPeg Include="$(NRoot)\snippets\peg-parser\Nemerle.Peg\Nemerle.Peg.nproj" />
<NPeg Include="$(NRoot)\snippets\peg-parser\Nemerle.Peg.Macros\Nemerle.Peg.Macros.nproj" />
</ItemGroup>
<!--Projects related to C# parser-->
<ItemGroup>
<NCSharp Include="$(NRoot)\snippets\csharp-parser\CSharpParser\CSharpParser.nproj" />
<NCSharp Include="$(NRoot)\snippets\csharp-parser\CSharpToNemerle\CSharpToNemerle.nproj" />
<NCSharp Include="$(NRoot)\snippets\csharp-parser\CSharpParser.TestMacros\CSharpParser.TestMacros.nproj" />
<NCSharp Include="$(NRoot)\snippets\csharp-parser\CSharpParser.Tests\CSharpParser.Tests.nproj" />
</ItemGroup>
<!--Projects related to ComputationExpressions -->
<ItemGroup>
<NComputationExpressions Include="$(NRoot)\snippets\ComputationExpressions\ComputationExpressions\ComputationExpressions.nproj" />
<NComputationExpressions Include="$(NRoot)\snippets\ComputationExpressions\ComputationExpressions.Macros\ComputationExpressions.Macros.nproj" />
<NComputationExpressions Include="$(NRoot)\snippets\ComputationExpressions\Test\Test.nproj" />
</ItemGroup>
<!--Projects related to Nemerle.Async -->
<ItemGroup Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">
<NAsync Include="$(NRoot)\snippets\Nemerle.Async\Nemerle.Async\Nemerle.Async.nproj" />
<NAsync Include="$(NRoot)\snippets\Nemerle.Async\Nemerle.Async.Macros\Nemerle.Async.Macros.nproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Nemerle.Statechart_snippets.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Lib\Nemerle.Statechart.Lib.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Nemerle.Statechart.Runtime\Nemerle.Statechart.Runtime.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Tests\fsmtest\fsmtest_release.nproj" />
<!--<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Tests\fsmtest\fsmtest.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Tests\gui_file_test\FileFsmTest.nproj" />-->
</ItemGroup>
<!--Projects related to PowerPack-->
<ItemGroup>
<NPowerPack Include="$(NRoot)\snippets\Nemerle.Xml\Nemerle.Xml.Macro\Nemerle.Xml.Macro.nproj" />
<NPowerPack Include="$(NRoot)\snippets\ObjectExpressions\NewObjectMacro\NewObjectMacro.nproj" />
<NPowerPack Include="$(NRoot)\snippets\Nemerle.Diff\Nemerle.Diff\Nemerle.Diff.nproj" />
<NPowerPack Include="$(NRoot)\snippets\aop\DevMacros.nproj" />
<NPowerPack Include="$(NRoot)\snippets\aop\Nemerle.Aop.nproj" />
<NPowerPack Include="$(NRoot)\snippets\ActivePatterns\ActivePatterns\Nemerle.ActivePatterns.nproj" />
<NPowerPack Include="$(NRoot)\snippets\Nemerle.VirtualStatics\Nemerle.VirtualStatics\Nemerle.VirtualStatics.nproj" />
</ItemGroup>
<!--Projects related to Linq-->
<ItemGroup>
<NLinq Include="$(NRoot)\Linq\Macro\Linq.nproj" />
</ItemGroup>
<ItemGroup>
<NUnsafe Include="$(NRoot)\snippets\Nemerle.Unsafe\Nemerle.Unsafe\Nemerle.Unsafe.nproj" />
</ItemGroup>
<ItemGroup Condition="'$(UseMSBuild)' != ''">
<NWpf Include="$(NRoot)\snippets\Nemerle.WPF\Nemerle.WPF\Nemerle.WPF.nproj" />
</ItemGroup>
<ItemGroup>
<CompilerTestsFiles Include="$(NBin)\Tests\**\*.*" />
</ItemGroup>
<!--Projects related to tools-->
<ItemGroup>
<NTools Include="$(NRoot)\tools\nemish.nproj" />
<NTools Include="$(NRoot)\tools\Nemerle.Evaluation.nproj" />
<NTools Include="$(NRoot)\tools\Nemerle.NAnt.Tasks.nproj" />
<NTools Include="$(NRoot)\tools\reflector-addon\reflector-addon.nproj" />
</ItemGroup>
<!--Projects related to integration-->
<ItemGroup Condition="'$(UseMSBuild)' != '' And ('$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5')">
<NIntegrationProject Include="$(NRoot)\VsIntegration\ComInteropHelper\ComInteropHelper.csproj" />
<NIntegrationProject Include="$(NRoot)\VsIntegration\Nemerle.VisualStudio\GUI\WpfHint\WpfHint.csproj" />
<NIntegrationProject Include="$(NRoot)\VsIntegration\Nemerle.Compiler.Utils\Nemerle.Compiler.Utils.csproj" />
<NIntegrationProject Include="$(NRoot)\VsIntegration\Nemerle.VisualStudio\Nemerle.VisualStudio.csproj" />
<NIntegrationProject Include="$(NRoot)\VsIntegration\Nemerle.VsIntegration.Tests\Nemerle.VsIntegration.Tests.csproj" />
<NIntegrationProject Include="$(NRoot)\VsIntegration\Nemerle.Compiler.Utils.Tests\Nemerle.Compiler.Utils.Tests.csproj" />
<NIntegrationProject Condition=" '$(Configuration)' != 'Debug' " Include="$(NRoot)\VsIntegration\Shell\NemerleStudio\NemerleStudio.vcproj" />
<NIntegrationProject Condition=" '$(Configuration)' != 'Debug' " Include="$(NRoot)\VsIntegration\Shell\NemerleStudioUI\NemerleStudioUI.vcproj" />
<NIntegrationProject Condition=" '$(Configuration)' != 'Debug' " Include="$(NRoot)\tools\Nemerle.Evaluation.nproj" />
</ItemGroup>
<ItemGroup Condition="'$(UseMSBuild)' != '' And ('$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1')">
<NIntegrationProject Include="$(NRoot)\snippets\VS2010\WpfHint\WpfHint.csproj" />
<NIntegrationProject Include="$(NRoot)\snippets\VS2010\Nemerle.Compiler.Utils\Nemerle.Compiler.Utils.csproj" />
<NIntegrationProject Include="$(NRoot)\snippets\VS2010\Nemerle.VisualStudio\Nemerle.VisualStudio.csproj" />
</ItemGroup>
<!--Initialize FX and SDK tools locations-->
<Target Name="InitTools">
<GetFrameworkPath>
<Output Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'" TaskParameter="FrameworkVersion40Path" PropertyName="FW40" />
<Output Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'" TaskParameter="FrameworkVersion35Path" PropertyName="FW35" />
<Output Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'" TaskParameter="FrameworkVersion20Path" PropertyName="FW20" />
</GetFrameworkPath>
<GetFrameworkSdkPath Condition="'$(UseMSBuild)' != ''">
<Output Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'" TaskParameter="Path" PropertyName="SDK" />
<Output Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'" TaskParameter="Path" PropertyName="SDK_3" />
</GetFrameworkSdkPath>
<GetFrameworkSdkPath Condition="'$(UseMSBuild)' == ''">
<Output TaskParameter="Path" PropertyName="SDK" />
</GetFrameworkSdkPath>
<PropertyGroup Condition="'$(UseMSBuild)' != ''">
<SDKBin Condition="'$(SDKBin)' == '' And ('$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5')">$(SDK)\bin</SDKBin>
<SDKBin Condition="'$(SDKBin)' == '' And Exists('$(SDK_3)..\v10.0A\bin\NETFX 4.6.1 Tools\al.exe')">$(SDK_3)..\v10.0A\bin\NETFX 4.6.1 Tools</SDKBin>
<SDKBin Condition="'$(SDKBin)' == '' And Exists('$(SDK_3)..\v10.0A\bin\NETFX 4.6 Tools\al.exe')" >$(SDK_3)..\v10.0A\bin\NETFX 4.6 Tools</SDKBin>
<SDKBin Condition="'$(SDKBin)' == '' And Exists('$(SDK_3)..\v8.1A\bin\NETFX 4.5.1 Tools\al.exe')" >$(SDK_3)..\v8.1A\bin\NETFX 4.5.1 Tools</SDKBin>
<SDKBin Condition="'$(SDKBin)' == '' And Exists('$(SDK_3)..\v8.1A\bin\NETFX 4.5 Tools\al.exe')" >$(SDK_3)..\v8.1A\bin\NETFX 4.5 Tools</SDKBin>
<SDKBin Condition="'$(SDKBin)' == '' And Exists('$(SDK_3)..\v8.0\bin\NETFX 4.5 Tools\al.exe')" >$(SDK_3)..\v8.0\bin\NETFX 4.5 Tools</SDKBin>
<SDKBin Condition="'$(SDKBin)' == '' And Exists('$(SDK_3)..\v8.0A\bin\NETFX 4.0 Tools')" >$(SDK_3)..\v8.0A\bin\NETFX 4.0 Tools</SDKBin>
<SDKBin Condition="'$(SDKBin)' == '' And ('$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1')">$(SDK_3)\bin\NETFX 4.0 Tools</SDKBin>
<GacUtil>"$(SDKBin)\gacutil.exe"</GacUtil>
<Ildasm>"$(SDKBin)\ildasm.exe"</Ildasm>
<PEVerify>"$(SDKBin)\peverify.exe"</PEVerify>
<NGen Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">"$(FW20)\ngen.exe"</NGen>
<NGen Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">"$(FW40)\ngen.exe"</NGen>
<MSBuild>$(MSBuildBinPath)\msbuild.exe</MSBuild>
<Junction>$(NRoot)\ExternalDependences\junction.exe</Junction>
<Nuget>$(NRoot)\ExternalDependences\NuGet.exe</Nuget>
</PropertyGroup>
<PropertyGroup Condition="'$(UseMSBuild)' == ''">
<SDKToolsBin>$(SDK)\..\..\..\bin</SDKToolsBin>
<GacUtil>"$(SDKToolsBin)\gacutil"</GacUtil>
<Ildasm>"$(SDKToolsBin)\monodis"</Ildasm>
<PEVerify>"$(SDKToolsBin)\peverify"</PEVerify>
<NGen Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">"$(FW20)\ngen.exe"</NGen>
<NGen Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">"$(FW40)\ngen.exe"</NGen>
<XBuild>$(MSBuildBinPath)\..\..\..\xbuild</XBuild>
<Junction>$(NRoot)\ExternalDependences\junction.exe</Junction>
</PropertyGroup>
<Message Text="Framework tools found at:" Importance="high" />
<Message Text=" MSBuild - $(MSBuild)" Importance="high" Condition="'$(UseMSBuild)' != ''" />
<Message Text=" XBuild - $(XBuild)" Importance="high" Condition="'$(UseMSBuild)' == ''" />
<Message Text=" NGen - $(NGen)" Importance="high" />
<Message Text=" SDK tools found at:" Importance="high" />
<Message Text=" GacUtil - $(GacUtil)" Importance="high" />
<Message Text=" Ildasm - $(Ildasm)" Importance="high" />
<Message Text=" PEVerify - $(PEVerify)" Importance="high" />
<Message Text=" ALPath - $(ALPath)" Importance="high" />
<Message Text=" ExternalDependences:" Importance="high" />
<Message Text=" Junction - $(Junction)" Importance="high" />
</Target>
<!--Builds and deploy tasks dll into boot directory-->
<Target Name="NTasks" DependsOnTargets="InitTools">
<MSBuild Projects="@(NTasksProject)" Properties="OutputPath=$(NBoot); IntermediateOutputPath=$(NObj)\Tasks\; NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
<CreateItem Include="$(NBoot)\Nemerle.MSBuild.Tasks.dll" Condition="'$(UseMSBuild)' != ''">
<Output ItemName="NTasksFiles" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(NBoot)\Nemerle.XBuild.Tasks.dll" Condition="'$(UseMSBuild)' == ''">
<Output ItemName="NTasksFiles" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(NBoot)\Nemerle.MSBuild.targets">
<Output ItemName="NTasksFiles" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(NBoot)\ncc.bat" Condition="'$(UseMSBuild)' == ''">
<Output ItemName="NTasksFiles" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(NBoot)\ncc" Condition="'$(UseMSBuild)' == ''">
<Output ItemName="NTasksFiles" TaskParameter="Include" />
</CreateItem>
</Target>
<!--Boot files-->
<Target Name="NPrepareBoot">
<CreateItem Include="$(NRootBoot)\*.exe">
<Output ItemName="NBootFiles" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(NRootBoot)\*.dll">
<Output ItemName="NBootFiles" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(NBootFiles)" DestinationFolder="$(NBoot)" />
</Target>
<!--Keys-->
<Target Name="NPrepareKeys">
<CreateItem Include="$(NRoot)\misc\keys\*.snk">
<Output ItemName="NKeyFiles" TaskParameter="Include"/>
</CreateItem>
<Copy SourceFiles="@(NKeyFiles)" DestinationFolder="$(NBin)\keys" />
</Target>
<!--Builds compiler using boot-->
<Target Name="Stage1" DependsOnTargets="NPrepareKeys;NPrepareBoot;NTasks">
<PropertyGroup>
<NPrevBin>$(NBoot)</NPrevBin>
<NCurBin>$(NBin)\Stage1</NCurBin>
<NCurObj>$(NObj)\Stage1</NCurObj>
</PropertyGroup>
<Message Importance="high" Text="SDKBin='$(SDKBin)'" />
<Message Importance="high" Text="SDK_3='$(SDK_3)'" />
<MSBuild Projects="@(NCompilerProject)" Properties="OutputPath=$(NCurBin); IntermediateOutputPath=$(NCurObj)\; $(NDefineProjectConstants); Nemerle=$(NPrevBin); NKeysDir=$(NBin)\keys; SDKBin=$(SDKBin)" Targets="$(NTargetName)" />
<Copy SourceFiles="@(NTasksFiles)" DestinationFolder="$(NCurBin)" />
</Target>
<!--Builds compiler using Stage1-->
<Target Name="Stage2" DependsOnTargets="Stage1">
<PropertyGroup>
<NPrevBin>$(NBin)\Stage1</NPrevBin>
<NCurBin>$(NBin)\Stage2</NCurBin>
<NCurObj>$(NObj)\Stage2</NCurObj>
</PropertyGroup>
<MSBuild Projects="@(NCompilerProject)" Properties="OutputPath=$(NCurBin); IntermediateOutputPath=$(NCurObj)\; $(NDefineProjectConstants); Nemerle=$(NPrevBin); NKeysDir=$(NBin)\keys; SDKBin=$(SDKBin)" Targets="$(NTargetName)" />
<Copy SourceFiles="@(NTasksFiles)" DestinationFolder="$(NCurBin)" />
</Target>
<!--Builds compiler using Stage2-->
<Target Name="Stage3" DependsOnTargets="Stage2">
<PropertyGroup>
<NPrevBin>$(NBin)\Stage2</NPrevBin>
<NCurBin>$(NBin)\Stage3</NCurBin>
<NCurObj>$(NObj)\Stage3</NCurObj>
</PropertyGroup>
<MSBuild Projects="@(NCompilerProject)" Properties="OutputPath=$(NCurBin); IntermediateOutputPath=$(NCurObj)\; $(NDefineProjectConstants); Nemerle=$(NPrevBin); NKeysDir=$(NBin)\keys; SDKBin=$(SDKBin)" Targets="$(NTargetName)" />
<Copy SourceFiles="@(NTasksFiles)" DestinationFolder="$(NCurBin)" />
</Target>
<!--Builds compiler using Stage3-->
<Target Name="Stage4" DependsOnTargets="Stage3">
<PropertyGroup>
<NPrevBin>$(NBin)\Stage3</NPrevBin>
<NCurBin>$(NBin)\Stage4</NCurBin>
<NCurObj>$(NObj)\Stage4</NCurObj>
</PropertyGroup>
<MSBuild Projects="@(NCompilerProject)" Properties="OutputPath=$(NCurBin); IntermediateOutputPath=$(NCurObj)\; $(NDefineProjectConstants); Nemerle=$(NPrevBin); NKeysDir=$(NBin)\keys; SDKBin=$(SDKBin)" Targets="$(NTargetName)" />
<Copy SourceFiles="@(NTasksFiles)" DestinationFolder="$(NCurBin)" />
</Target>
<!--Builds only PowerPack using Stage1 compiler.-->
<Target Name="PowerPack" DependsOnTargets="Stage1; _PowerPack" />
<!--Builds all tools, linq, vs integration and shell. Only Stage1 compiler required.-->
<Target Name="IntegrationFast" DependsOnTargets="Stage1; _Integration" />
<!--Builds all tools, linq, vs integration and shell. Stage4 compiler required.-->
<Target Name="IntegrationFull" DependsOnTargets="Stage4; Validate; CompilerTests; _Integration; IdeEngineTests" />
<!--Builds MSI package. Only Stage1 compiler required.-->
<Target Name="InstallerFast" DependsOnTargets="IntegrationFast; _PowerPack; _NugetPack; _Installer;" />
<!--Builds MSI package. Stage4 compiler required.-->
<Target Name="InstallerFull" DependsOnTargets="IntegrationFull; _PowerPack; _NugetPack; _Installer;" />
<!--Compare last two stages on IL level-->
<Target Name="Validate" DependsOnTargets="InitTools">
<ItemGroup>
<Asm2 Include="$(NPrevBin)\*.dll" />
<Asm2 Include="$(NPrevBin)\*.exe" />
<Asm3 Include="$(NCurBin)\*.dll" />
<Asm3 Include="$(NCurBin)\*.exe" />
</ItemGroup>
<PropertyGroup Condition="'$(UseMSBuild)' != ''" >
<ValidateOutParameter>/out</ValidateOutParameter>
<ValidateAdditionalParameters>/nobar</ValidateAdditionalParameters>
</PropertyGroup>
<PropertyGroup Condition="'$(UseMSBuild)' == ''" >
<ValidateOutParameter>--output</ValidateOutParameter>
<ValidateAdditionalParameters></ValidateAdditionalParameters>
</PropertyGroup>
<Exec Command="$(Ildasm) "%(Asm2.FullPath)" $(ValidateOutParameter)="%(Asm2.FullPath).il" $(ValidateAdditionalParameters)" WorkingDirectory="$(NPrevBin)" />
<Exec Command="$(Ildasm) "%(Asm3.FullPath)" $(ValidateOutParameter)="%(Asm3.FullPath).il" $(ValidateAdditionalParameters)" WorkingDirectory="$(NCurBin)" />
<ItemGroup>
<IL_PREV Include="$(NPrevBin)\*.il" />
<IL_LAST Include="$(NCurBin)\*.il" />
</ItemGroup>
<MSBuild.Community.Tasks.FileUpdate Files="@(IL_PREV)" Regex="^(//.*)(?=\r)" ReplacementText="// REPLACED" Multiline="True" />
<MSBuild.Community.Tasks.FileUpdate Files="@(IL_LAST)" Regex="^(//.*)(?=\r)" ReplacementText="// REPLACED" Multiline="True" />
<!-- Windows -->
<MSBuild.Community.Tasks.FileUpdate Files="@(IL_PREV)" Regex="^(//.*)(?=\r)" ReplacementText="// REPLACED" Multiline="True" Condition=" '$(OS)' == 'Windows_NT' "/>
<MSBuild.Community.Tasks.FileUpdate Files="@(IL_LAST)" Regex="^(//.*)(?=\r)" ReplacementText="// REPLACED" Multiline="True" Condition=" '$(OS)' == 'Windows_NT' "/>
<Exec Command="fc "$(NPrevBin)\*.il" "$(NCurBin)\*.il"" Condition=" '$(OS)' == 'Windows_NT' "/>
<!-- Unix -->
<MSBuild.Community.Tasks.FileUpdate Files="@(IL_PREV)" Regex="//.*$" ReplacementText="// REPLACED" Multiline="True" Condition=" '$(OS)' != 'Windows_NT' "/>
<MSBuild.Community.Tasks.FileUpdate Files="@(IL_LAST)" Regex="//.*$" ReplacementText="// REPLACED" Multiline="True" Condition=" '$(OS)' != 'Windows_NT' "/>
<Exec Command="for il in $(NPrevBin)/*.il; do diff $il "$(NCurBin)/${il##*/}" || exit 1; done" Condition=" '$(OS)' != 'Windows_NT' " />
<Exec Command="$(PEVerify) "%(Asm3.FullPath)"" ContinueOnError="False" />
<Delete Files="@(IL_PREV)" />
<Delete Files="@(IL_LAST)" />
</Target>
<!--Runs compiler tests.-->
<Target Name="CompilerTests" DependsOnTargets="Linq;Unsafe;_PegAndCSharp;TestFramework;_Wpf">
<PropertyGroup>
<NTeamCityPositiveTestArguments Condition=" '$(TEAMCITY_VERSION)' != '' ">"-team-city-test-suite:Ncc-Positive-$(NVer)"</NTeamCityPositiveTestArguments>
<NTeamCityNegativeTestArguments Condition=" '$(TEAMCITY_VERSION)' != '' ">"-team-city-test-suite:Ncc-Negative-$(NVer)"</NTeamCityNegativeTestArguments>
</PropertyGroup>
<CreateItem Include="$(NBin)\TestFramework\*.*">
<Output ItemName="NTestFrameworkFiles" TaskParameter="Include" />
</CreateItem>
<!--Delete Files="@(CompilerTestsFiles)" / DONT WORK WITH READONLY FILES!-->
<Exec Command="IF EXIST "$(NBin)\Tests\" DEL "$(NBin)\Tests\" /F /S /Q" WorkingDirectory="$(NBin)\" Condition=" '$(OS)' == 'Windows_NT' " />
<Delete Files="@(CompilerTestsFiles)" Condition=" '$(OS)' != 'Windows_NT' " />
<Copy SourceFiles="$(NBin)\Linq\Nemerle.Linq.dll;$(NBin)\Unsafe\Nemerle.Unsafe.dll;@(CSharpCompilerFiles)" DestinationFolder="$(NBin)\Tests\positive" />
<Copy SourceFiles="$(NBin)\Linq\Nemerle.Linq.dll;$(NBin)\Unsafe\Nemerle.Unsafe.dll;@(CSharpCompilerFiles)" DestinationFolder="$(NBin)\Tests\negative" />
<Copy SourceFiles="$(NBin)\PowerPack\Nemerle.WPF.dll" DestinationFolder="$(NBin)\Tests\positive" Condition=" '$(UseMSBuild)' != '' " />
<Copy SourceFiles="$(NBin)\PowerPack\Nemerle.WPF.dll" DestinationFolder="$(NBin)\Tests\negative" Condition=" '$(UseMSBuild)' != '' " />
<!--Delete all temporary files in old testing directory-->
<CreateItem Include="$(NRoot)\testsuite\*.exe;$(NRoot)\testsuite\*.dll;$(NRoot)\testsuite\*.pdb">
<Output ItemName="NTestSuiteTempFiles" TaskParameter="Include"/>
</CreateItem>
<Delete Files="@(NTestSuiteTempFiles)" />
<!--Copy test files to the testing directory-->
<CreateItem Include="$(NRoot)\testsuite\*.*">
<Output ItemName="NTestSuiteFiles" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(NTestFrameworkFiles);@(NTestSuiteFiles)" DestinationFolder="$(NBin)\Tests\positive" />
<Copy SourceFiles="@(NTestFrameworkFiles);@(NTestSuiteFiles)" DestinationFolder="$(NBin)\Tests\negative" />
<!--Run positive tests-->
<Exec Command="$(ExeRunner)"$(NBin)\Tests\positive\Nemerle.Compiler.Test.exe" $(NTeamCityPositiveTestArguments) -output:. "-p:-nowarn:10003 -def:$(NProjectConstants)" "$(NRoot)\testsuite\positive\*.n" "$(NRoot)\testsuite\positive\*.nnn" "$(NRoot)\testsuite\positive\*.cs"" WorkingDirectory="$(NBin)\Tests\positive" IgnoreStandardErrorWarningFormat="true" />
<!--Run negative tests-->
<Exec Command="$(ExeRunner)"$(NBin)\Tests\negative\Nemerle.Compiler.Test.exe" $(NTeamCityNegativeTestArguments) -output:. "-p:-nowarn:10003 -def:$(NProjectConstants)" "$(NRoot)\testsuite\negative\*.n" "$(NRoot)\testsuite\negative\*.nnn" "$(NRoot)\testsuite\negative\*.cs"" WorkingDirectory="$(NBin)\Tests\negative" IgnoreStandardErrorWarningFormat="true" />
</Target>
<!--Install Nemerle compiler to specified folder. By default to ProgramFiles. To override folder set NInstall property.-->
<Target Name="Install" DependsOnTargets="InitTools" Condition="'$(UseMSBuild)' != ''">
<Error Condition=" '$(NCurBin)' == '' " Text="Property NCurBin is not set. Any stage of compilation should preceed the Install target." />
<!--Path which should contane binary filese to be installed-->
<!--PropertyGroup Condition=" '$(NCurBin)' == '' ">
<NCurBin>$(NBin)\Stage1</NCurBin>
</PropertyGroup-->
<Message Importance="high" Text="Install binaries from: '$(NCurBin)'" />
<ItemGroup>
<_FilesToCopyToNInstallExculde Include="Nemerle.dll" />
<_FilesToCopyToNInstallExculde Include="Nemerle.pdb" />
<_FilesToCopyToNInstallExculde Include="Nemerle.xml" />
<_FilesToCopyToNInstallExculde Include="Nemerle.Compiler.dll" />
<_FilesToCopyToNInstallExculde Include="Nemerle.Compiler.pdb" />
<_FilesToCopyToNInstallExculde Include="Nemerle.Compiler.xml" />
<_FilesToCopyToNInstallExculde Include="Nemerle.Macros.dll" />
<_FilesToCopyToNInstallExculde Include="Nemerle.Macros.pdb" />
<_FilesToCopyToNInstallExculde Include="Nemerle.Macros.xml" />
<FilesToCopyToNInstall Include="$(NBin)\Linq\*.*" Exclude="@(_FilesToCopyToNInstallExculde->'$(NBin)\Linq\%(Filename)%(Extension)')" />
<FilesToCopyToNInstall Include="$(NBin)\Unsafe\*.*" Exclude="@(_FilesToCopyToNInstallExculde->'$(NBin)\Unsafe\%(Filename)%(Extension)')" />
<FilesToCopyToNInstall Include="$(NBin)\TestFramework\*.*" Exclude="@(_FilesToCopyToNInstallExculde->'$(NBin)\TestFramework\%(Filename)%(Extension)')" />
<FilesToCopyToNInstall Include="$(NBin)\PowerPack\*.*" Exclude="@(_FilesToCopyToNInstallExculde->'$(NBin)\PowerPack\%(Filename)%(Extension)')" />
<FilesToCopyToNInstall Include="$(NBin)\Nuget\*.*" />
<FilesToCopyToNInstall Include="$(NBin)\VsIntegration\*.*" />
<FilesToCopyToNInstall Include="$(NCurBin)\*.*" />
</ItemGroup>
<Copy SourceFiles="@(FilesToCopyToNInstall)" DestinationFolder="$(NInstall)" />
</Target>
<Target Name="IdeEngineTests" Condition="'$(UseMSBuild)' != '' And ('$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5')">
<!--DependsOnTargets="IntegrationFull"-->
<!--Run NUnit-tests for Nemerle.Compiler.Utils.dll (Engine Extentions of compiler engine)-->
<Exec Command="$(ExeRunner)"$(NRoot)\ExternalDependences\nunit-console.exe" /nologo "$(NBin)\VsIntegration\Nemerle.Compiler.Utils.Tests.dll" /xml="$(NBin)\VsIntegration\TestResult.xml"" />
</Target>
<!--Helper target to build integration-->
<Target Name="_Integration" DependsOnTargets="Linq;Unsafe;TestFramework;Tools" Condition="'$(UseMSBuild)' != ''">
<MSBuild Projects="@(NIntegrationProject)" Properties="OutputPath=$(NBin)\VsIntegration\; Nemerle=$(NCurBin); Configuration=$(Configuration); BaseIntermediateOutputPath=$(NObj)\VsIntegration\; IntermediateOutputPath=$(NObj)\VsIntegration\; NKeysDir=$(NBin)\keys; DeployExtension=$(NInstallIntegration)" Targets="$(NTargetName)" />
</Target>
<Target Name="TestFramework">
<MSBuild Projects="@(NTestFramework)" Properties="OutputPath=$(NBin)\TestFramework\; IntermediateOutputPath=$(NObj)\TestFramework\; Nemerle=$(NCurBin); $(NDefineProjectConstants); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
<!-- run Nemerle.Diff tests -->
<Exec Command="$(ExeRunner)"$(NBin)\TestFramework\Nemerle.Diff.Tests.exe"" />
</Target>
<Target Name="Linq">
<MSBuild Projects="@(NLinq)" Properties="OutputPath=$(NBin)\Linq\; IntermediateOutputPath=$(NObj)\Linq\; Nemerle=$(NCurBin); $(NDefineProjectConstants); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
</Target>
<Target Name="Unsafe">
<MSBuild Projects="@(NUnsafe)" Properties="OutputPath=$(NBin)\Unsafe\; IntermediateOutputPath=$(NObj)\Unsafe\; Nemerle=$(NCurBin); $(NDefineProjectConstants); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
</Target>
<Target Name="Tools">
<MSBuild Projects="@(NTools)" Properties="OutputPath=$(NBin)\Tools\; IntermediateOutputPath=$(NObj)\Tools\; Nemerle=$(NCurBin); $(NDefineProjectConstants); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
</Target>
<!--Helper target to build PEG, C# parser, and test it -->
<Target Name="_PegAndCSharp">
<MSBuild Projects="@(NPeg)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
<MSBuild Projects="@(NCSharp)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
<!-- run tests -->
<Exec Command="$(ExeRunner)"$(NBin)\PowerPack\CSharpParser.Tests.exe"" />
</Target>
<!--Helper target to build ComputationExpressions and test it -->
<Target Name="_ComputationExpressions">
<MSBuild Projects="@(NComputationExpressions)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
<!-- run tests -->
<!--<Exec Command="$(ExeRunner)"$(NBin)\PowerPack\ComputationExpressions.Tests.exe"" />-->
</Target>
<!--Helper target to build Nemerle.Async and test it -->
<Target Name="_Async" Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">
<MSBuild Projects="@(NAsync)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
</Target>
<!--Helper target to build Nemerle.Statechart and test it -->
<Target Name="_Statechart" DependsOnTargets="_PegAndCSharp" Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">
<MSBuild Projects="@(NStatechart)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); NemerlePowerPack=$(NBin)\PowerPack; Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
<!-- run tests -->
<!-- <Exec Command="$(ExeRunner)"$(NBin)\PowerPack\fsmtest.exe"" /> -->
</Target>
<PropertyGroup>
<PowerPackDir>$(NBin)\PowerPack\</PowerPackDir>
<NSTestSuiteDir>$(NRoot)\snippets\Nemerle.Statechart\tests\testsuite\</NSTestSuiteDir>
<NSTestsDir>$(NSTestSuiteDir)\tests\</NSTestsDir>
</PropertyGroup>
<ItemGroup>
<NStateChartTestFiles Include="$(PowerPackDir)\Nemerle.Statechart.Lib.dll" />
<NStateChartTestFiles Include="$(PowerPackDir)\Nemerle.dll" />
<NStateChartTestFiles Include="$(PowerPackDir)\Nemerle.Statechart.dll" />
<NStateChartTestFiles Include="$(PowerPackDir)\Nemerle.Statechart.Runtime.dll" />
<NStateChartTestFiles Include="$(PowerPackDir)\fsmtest.exe" />
<NStateChartRefFiles Include="@(NStateChartTestFiles)" Exclude="$(PowerPackDir)\Nemerle.dll"/>
<NStateChartRefs Include="@(NStateChartRefFiles->'$(NSTestsDir)\%(filename)%(extension)')" />
</ItemGroup>
<Target Name="NStatechartTests" DependsOnTargets="Stage1;_Statechart" Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1'">
<ItemGroup>
<NSTestsRefs Include="@(NStateChartRefs->'-ref:"%(identity)"')" />
</ItemGroup>
<PropertyGroup>
<NTest>$(NBin)\TestFramework\Nemerle.Compiler.Test.exe</NTest>
<TestCommand>$(ExeRunner)$(NTest) @(NSTestsRefs, ' ') -output:tests\ positive\*.n negative\*.n</TestCommand>
</PropertyGroup>
<Delete Files="$(NSTestsDir)\*.*" />
<Copy SourceFiles="@(NStateChartTestFiles)" DestinationFolder="$(NSTestsDir)" />
<Exec Command="$(TestCommand)" WorkingDirectory="$(NSTestSuiteDir)" />
</Target>
<!--Helper target to build Nemerle.WPF -->
<Target Name="_Wpf" Condition="'$(UseMSBuild)' != ''">
<MSBuild Projects="@(NWpf)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); NemerlePowerPack=$(NBin)\PowerPack; Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
</Target>
<!--Helper target to build power pack-->
<Target Name="_PowerPack" DependsOnTargets="_PegAndCSharp; Unsafe; TestFramework; _ComputationExpressions; _Async; _Statechart; _Wpf">
<MSBuild Projects="@(NPowerPack)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
</Target>
<Target Name="_NugetPack" Condition=" '$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5' Or '$(TargetFrameworkVersion)' == 'v4.5.1' " DependsOnTargets="_PegAndCSharp; TestFramework">
<GetAssemblyIdentity AssemblyFiles="$(NCurBin)\Nemerle.dll">
<Output TaskParameter="Assemblies" ItemName="NemerleRuntimeIdentity" />
</GetAssemblyIdentity>
<PropertyGroup>
<NemerleProductVersion>$([System.Text.RegularExpressions.Regex]::Replace('%(NemerleRuntimeIdentity.Version)', '(?<major>\d+)\.(?<minor>\d+)\.0\.(?<build>\d+)', '${major}.${minor}.${build}.0'))</NemerleProductVersion>
<NugetOutput>$(NBin)\Nuget</NugetOutput>
<NugetProperties>NBin=$(NBin);NCurBin=$(NCurBin);version=$(NemerleProductVersion)</NugetProperties>
</PropertyGroup>
<RemoveDir Directories="$(NugetOutput)" />
<MakeDir Directories="$(NugetOutput)" />
<Exec Command="$(Nuget) pack Nemerle.nuspec -OutputDirectory "$(NugetOutput)" -Properties "$(NugetProperties)"" WorkingDirectory="$(NRoot)" />
<Exec Command="$(Nuget) pack Nemerle.Compiler.nuspec -OutputDirectory "$(NugetOutput)" -Properties "$(NugetProperties)"" WorkingDirectory="$(NRoot)" />
</Target>
<Target Name="DevBuildQuickNccOnly" DependsOnTargets="Stage1; Linq;Unsafe;_PegAndCSharp; _NugetPack; _Integration; Install" />
<Target Name="DevBuildQuick" DependsOnTargets="Stage1; _NugetPack; _Integration; Install" />
<Target Name="DevBuildQuickWithTests" DependsOnTargets="Stage1; CompilerTests; _NugetPack; _Integration; IdeEngineTests; Install" />
<Target Name="DevBuild2Stage" DependsOnTargets="Stage2; _NugetPack; _Integration; Install" />
<Target Name="DevBuild2StageWithTests" DependsOnTargets="Stage2; CompilerTests; _NugetPack; _Integration; IdeEngineTests; Install" />
<Target Name="DevBuildFull" DependsOnTargets="Stage4; Validate; CompilerTests; _NugetPack; _Integration; IdeEngineTests; _PowerPack; Install" />
<!--Helper target to build installer.-->
<Target Name="_Installer" Condition="'$(UseMSBuild)' != ''">
<PropertyGroup>
<NCurBin Condition=" '$(NCurBin)' == '' ">$(NBin)\Stage1</NCurBin>
</PropertyGroup>
<MSBuild Projects="$(NRoot)\misc\packages\wix\nemerle.sln" Targets="$(NTargetName)" Properties="OutputPath=$(NBin)\Installer\; IntermediateOutputPath=$(NObj)\Installer\; Nemerle=$(NCurBin); Configuration=$(Configuration); NVer=$(NVer)" />
</Target>
</Project>