Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

449 lines (407 sloc) 31.11 kB
<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 Condition=" '$(NTargetName)' == '' ">
<NTargetName>Rebuild</NTargetName>
</PropertyGroup>
<PropertyGroup Condition=" '$(NInstall)' == '' ">
<!--Folder for Nemerle installation. To install use "Install" terget.-->
<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'">$(ProgramFiles)\Nemerle\Net-4.0</NInstall>
<NInstall Condition="'$(TargetFrameworkVersion)' == 'v4.5'">$(ProgramFiles)\Nemerle\Net-4.5</NInstall>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<!--Path to root directory of Nemerle sources.-->
<NRoot>$(MSBuildProjectDirectory)</NRoot>
<NVer Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">net-3.5</NVer>
<NVer Condition="'$(TargetFrameworkVersion)' == 'v4.0'">net-4.0</NVer>
<NVer Condition="'$(TargetFrameworkVersion)' == 'v4.5'">net-4.5</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'">$(NRoot)\boot-4.0\</NRootBoot>
<NRootBoot Condition="'$(TargetFrameworkVersion)' == 'v4.5'">$(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 -->
<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'">RUNTIME_MS;NET_4_0</NProjectConstants>
<NProjectConstants Condition="'$(Configuration)' == 'Debug'">$(NProjectConstants);DEBUG</NProjectConstants>
<NDefineProjectConstants>DefineConstants=$(NProjectConstants)</NDefineProjectConstants>
</PropertyGroup>
<!--Project required to build any Nemerle project (.nproj)-->
<ItemGroup>
<NTasksProject Include="$(NRoot)\Nemerle.MSBuild.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 -->
<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" />
</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.Diff -->
<ItemGroup>
<NDiff Include="$(NRoot)\snippets\Nemerle.Diff\Nemerle.Diff\Nemerle.Diff.nproj" />
<NDiff Include="$(NRoot)\snippets\Nemerle.Diff\Nemerle.Diff.Tests\Nemerle.Diff.Tests.nproj" />
</ItemGroup>
<!--Projects related to Nemerle.Async -->
<ItemGroup Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5'">
<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'">
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Nemerle.Statechart.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Nemerle.Statechart.Analyser\Nemerle.Statechart.Analyser.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Nemerle.Statechart.Generator\Nemerle.Statechart.Generator.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Nemerle.Statechart.Parser\Nemerle.Statechart.Parser.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Lib\Nemerle.Statechart.Lib.nproj" />
<NStatechart Include="$(NRoot)\snippets\Nemerle.Statechart\Ast\Nemerle.Statechart.Ast.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\Nemerle.WPF\Nemerle.WPF\Nemerle.WPF.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" />
</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>
<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="'$(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="'$(TargetFrameworkVersion)' == 'v4.0'">
<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>
<ItemGroup Condition="'$(TargetFrameworkVersion)' == 'v4.5'">
<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-VS-2012.csproj" />
</ItemGroup>
<!--Initialize FX and SDK tools locations-->
<Target Name="InitTools">
<GetFrameworkPath>
<Output Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5'" 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>
<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'" TaskParameter="Path" PropertyName="SDK_3" />
</GetFrameworkSdkPath>
<PropertyGroup>
<SDKBin Condition="'$(TargetFrameworkVersion)' == '' Or '$(TargetFrameworkVersion)' == 'v2.0' Or '$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.5'">$(SDK)\bin</SDKBin>
<SDKBin Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5'">$(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'">"$(FW40)\ngen.exe"</NGen>
<MSBuild>$(MSBuildBinPath)\msbuild.exe</MSBuild>
<Junction>$(NRoot)\ExternalDependences\junction.exe</Junction>
</PropertyGroup>
<Message Text="Framework tools found at:" Importance="high" />
<Message Text=" MSBuild - $(MSBuild)" Importance="high" />
<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=" 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">
<Output ItemName="NTasksFiles" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(NBoot)\Nemerle.MSBuild.targets">
<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>
<MSBuild Projects="@(NCompilerProject)" Properties="OutputPath=$(NCurBin); IntermediateOutputPath=$(NCurObj)\; $(NDefineProjectConstants); Nemerle=$(NPrevBin); NKeysDir=$(NBin)\keys" 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" 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" 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" 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; _Installer" />
<!--Builds MSI package. Stage4 compiler required.-->
<Target Name="InstallerFull" DependsOnTargets="IntegrationFull; _PowerPack; _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>
<Exec Command="$(Ildasm) %(Asm2.FullPath) /output:%(Asm2.FullPath).il /nobar" WorkingDirectory="$(NPrevBin)" />
<Exec Command="$(Ildasm) %(Asm3.FullPath) /output:%(Asm3.FullPath).il /nobar" 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" />
<Exec Command="fc $(NPrevBin)\*.il $(NCurBin)\*.il" />
<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">
<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)\" />
<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" />
<!--Delete all temporary files in old testing directory-->
<CreateItem Include="$(NRoot)\ncc\testsuite\*.exe;$(NRoot)\ncc\testsuite\*.dll;$(NRoot)\ncc\testsuite\*.pdb">
<Output ItemName="NTestSuiteTempFiles" TaskParameter="Include"/>
</CreateItem>
<Delete Files="@(NTestSuiteTempFiles)" />
<!--Copy test files to the testing directory-->
<CreateItem Include="$(NRoot)\ncc\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="&quot;$(NBin)\Tests\positive\Nemerle.Compiler.Test.exe&quot; $(NTeamCityPositiveTestArguments) -output:. &quot;-p:-nowarn:10003 -def:$(NProjectConstants)&quot; &quot;$(NRoot)\ncc\testsuite\positive\*.n&quot; &quot;$(NRoot)\ncc\testsuite\positive\*.cs&quot;" WorkingDirectory="$(NBin)\Tests\positive" />
<!--Run negative tests-->
<Exec Command="&quot;$(NBin)\Tests\negative\Nemerle.Compiler.Test.exe&quot; $(NTeamCityNegativeTestArguments) -output:. &quot;-p:-nowarn:10003 -def:$(NProjectConstants)&quot; &quot;$(NRoot)\ncc\testsuite\negative\*.n&quot; &quot;$(NRoot)\ncc\testsuite\negative\*.cs&quot;" WorkingDirectory="$(NBin)\Tests\negative" />
</Target>
<!--Install Nemerle compiler to specified folder. By default to ProgramFiles. To override folder set NInstall property.-->
<Target Name="Install" DependsOnTargets="InitTools">
<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)\VsIntegration\*.*" />
<FilesToCopyToNInstall Include="$(NCurBin)\*.*" />
</ItemGroup>
<Copy SourceFiles="@(FilesToCopyToNInstall)" DestinationFolder="$(NInstall)" />
</Target>
<Target Name="IdeEngineTests" Condition="'$(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="&quot;$(NRoot)\ExternalDependences\nunit-console.exe&quot; /nologo &quot;$(NBin)\VsIntegration\Nemerle.Compiler.Utils.Tests.dll&quot; /xml=&quot;$(NBin)\VsIntegration\TestResult.xml&quot;" />
</Target>
<!--Helper target to build integration-->
<Target Name="_Integration" DependsOnTargets="Linq;Unsafe;TestFramework;Tools">
<MSBuild Projects="@(NIntegrationProject)" Properties="OutputPath=$(NBin)\VsIntegration\; Nemerle=$(NCurBin); Configuration=$(Configuration); BaseIntermediateOutputPath=$(NObj)\VsIntegration\; IntermediateOutputPath=$(NObj)\VsIntegration\; NKeysDir=$(NBin)\keys" 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)" />
</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="&quot;$(NBin)\PowerPack\CSharpParser.Tests.exe&quot;" />
</Target>
<!--Helper target to build Nemerle.Diff and test it -->
<Target Name="_Diff">
<MSBuild Projects="@(NDiff)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
<!-- run tests -->
<Exec Command="&quot;$(NBin)\PowerPack\Nemerle.Diff.Tests.exe&quot;" />
</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="&quot;$(NBin)\PowerPack\ComputationExpressions.Tests.exe&quot;" />-->
</Target>
<!--Helper target to copy async targeting pack -->
<Target Name="_AsyncTargetingPack" Condition="'$(TargetFrameworkVersion)' == 'v4.0'">
<Copy SourceFiles="$(NRoot)\snippets\Nemerle.Async\AsyncTargetingPack.NET4\Microsoft.CompilerServices.AsyncTargetingPack.Net4.dll" DestinationFolder="$(NBin)\PowerPack\" />
<Copy SourceFiles="$(NRoot)\snippets\Nemerle.Async\AsyncTargetingPack.NET4\Microsoft.CompilerServices.AsyncTargetingPack.Net4.xml" DestinationFolder="$(NBin)\PowerPack\" />
<Copy SourceFiles="$(NRoot)\snippets\Nemerle.Async\AsyncTargetingPack.NET4\AsyncTargetingPack-EULA.html" DestinationFolder="$(NBin)\PowerPack\" />
</Target>
<!--Helper target to build Nemerle.Async and test it -->
<Target Name="_Async" DependsOnTargets="_AsyncTargetingPack" Condition="'$(TargetFrameworkVersion)' == 'v4.0' Or '$(TargetFrameworkVersion)' == 'v4.5'">
<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'">
<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="&quot;$(NBin)\PowerPack\fsmtest.exe&quot;" />-->
</Target>
<!--Helper target to build power pack-->
<Target Name="_PowerPack" DependsOnTargets="_PegAndCSharp; Unsafe; TestFramework; _ComputationExpressions; _Diff; _Async; _Statechart">
<MSBuild Projects="@(NPowerPack)" Properties="OutputPath=$(NBin)\PowerPack\; IntermediateOutputPath=$(NObj)\PowerPack\; Nemerle=$(NCurBin); Configuration=$(Configuration); NKeysDir=$(NBin)\keys" Targets="$(NTargetName)" />
</Target>
<Target Name="DevBuildQuickNccOnly" DependsOnTargets="Stage1; Install" />
<Target Name="DevBuildQuick" DependsOnTargets="Stage1; _Integration; _PowerPack; Linq; Install" />
<Target Name="DevBuildQuickWithTests" DependsOnTargets="Stage1; CompilerTests; _Integration; IdeEngineTests; Install" />
<Target Name="DevBuild2Stage" DependsOnTargets="Stage2; _Integration; Install" />
<Target Name="DevBuild2StageWithTests" DependsOnTargets="Stage2; CompilerTests; _Integration; IdeEngineTests; Install" />
<Target Name="DevBuildFull" DependsOnTargets="Stage4; Validate; CompilerTests; _Integration; IdeEngineTests; _PowerPack; Install" />
<!--Helper target to build installer.-->
<Target Name="_Installer" >
<PropertyGroup>
<NCurBin Condition=" '$(NCurBin)' == '' ">$(NBin)\Stage1</NCurBin>
</PropertyGroup>
<GetAssemblyIdentity AssemblyFiles="$(NCurBin)\Nemerle.dll">
<Output TaskParameter="Assemblies" ItemName="AssemblyVersion" />
</GetAssemblyIdentity>
<PropertyGroup>
<ActualVersion>%(AssemblyVersion.Version)</ActualVersion>
</PropertyGroup>
<MSBuild Projects="$(NRoot)\misc\packages\wix\nemerle.sln" Targets="$(NTargetName)" Properties="OutputPath=$(NBin)\Installer\; IntermediateOutputPath=$(NObj)\Installer\; Nemerle=$(NCurBin); Configuration=$(Configuration); NVer=$(NVer); ActualVersion=$(ActualVersion)" />
</Target>
</Project>
Jump to Line
Something went wrong with that request. Please try again.