Fetching contributors…
Cannot retrieve contributors at this time
112 lines (99 sloc) 7.53 KB
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug 4.0</Configuration>
<!--<Platform Condition=" '$(Platform)' == '' ">Any CPU</Platform>-->
<cljc>Clojure.Compile.exe</cljc>
<clji>Clojure.Main.exe</clji>
<Runtime Condition=" '$(Runtime)' == '' ">.Net</Runtime>
<DirectLinking Condition=" '$(DirectLinking)' == '' ">true</DirectLinking>
<!--
<DefineConstants Condition=" '$(Runtime)' == 'Mono' ">MONO</DefineConstants>
<DefineConstants Condition=" '$(Runtime)' == '.Net' ">DOTNET</DefineConstants>
-->
<PlatformSym Condition=" '$(Runtime)' == 'Mono' ">MONO</PlatformSym>
<PlatformSym Condition=" '$(Runtime)' == '.Net' ">DOTNET</PlatformSym>
</PropertyGroup>
<!--Is there a way to avoid this duplication? This is also encoded in the project files, although relative to a different path -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug 3.5' ">
<OutputPath>..\bin\3.5\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release 3.5' ">
<OutputPath>..\bin\3.5\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug 4.0' ">
<OutputPath>..\bin\4.0\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release 4.0' ">
<OutputPath>..\bin\4.0\Release\</OutputPath>
</PropertyGroup>
<UsingTask
TaskName="BuildTasks.SetEnvVar"
AssemblyFile="BuildTasks\bin\Debug\BuildTasks.dll" />
<Target Name="Build">
<MSBuild Projects="ClojureCLR.sln"
Properties="Runtime=$(Runtime);PlatformSym=$(PlatformSym);DirectLinking=$(DirectLinking)"/>
</Target>
<Target Name="CompileTest" DependsOnTargets="Build">
<Exec Command="$(cljc) clojure.test-clojure.genclass.examples clojure.test-clojure.protocols.examples clojure.test-clojure.attributes clojure.test-clojure.compilation.load-ns clojure.test-clojure.compilation.line-number-examples"
WorkingDirectory="$(OutputPath)"
Condition=" '$(Runtime)' == '.Net' "/>
<Exec Command="mono $(cljc) clojure.test-clojure.genclass.examples clojure.test-clojure.protocols.examples clojure.test-clojure.attributes clojure.test-clojure.compilation.load-ns clojure.test-clojure.compilation.line-number-examples"
WorkingDirectory="$(OutputPath)"
Condition=" '$(Runtime)' == 'Mono' "/>
</Target>
<Target Name="Test" DependsOnTargets="Build;CompileTest">
<Copy SkipUnchangedFiles="true" SourceFiles="Clojure.Tests\clojure\run_test.clj" DestinationFolder="$(OutputPath)" />
<SetEnvVar Name="clojure.test-clojure.exclude-namespaces" Value="#{clojure.test-clojure.compilation.load-ns}" />
<Exec Command="$(clji) clojure\run_test.clj"
WorkingDirectory="$(OutputPath)"
Condition=" '$(Runtime)' == '.Net' "/>
<Exec Command="mono $(clji) clojure\run_test.clj"
WorkingDirectory="$(OutputPath)"
Condition=" '$(Runtime)' == 'Mono' "/>
</Target>
<Target Name="TestGen" DependsOnTargets="Build;CompileTest">
<Copy SkipUnchangedFiles="true" SourceFiles="Clojure.Tests\clojure\run_test_generative.clj" DestinationFolder="$(OutputPath)" />
<Exec Command="$(clji) clojure\run_test_generative.clj"
WorkingDirectory="$(OutputPath)"
Condition=" '$(Runtime)' == '.Net' "/>
<Exec Command="mono $(clji) clojure\run_test_generative.clj"
WorkingDirectory="$(OutputPath)"
Condition=" '$(Runtime)' == 'Mono' "/>
</Target>
<!-- RJ: Reworked Dist target to work around Mono bug related to embeding ItemGroup inside a Target tag -->
<Target Name="Dist" DependsOnTargets="Build">
<!--DLR, Clojure dlls and exes-->
<CreateItem
Include="$(OutputPath)\Clojure.*;$(OutputPath)\Microsoft.*"
Exclude="$(OutputPath)\Clojure.Tests.dll;$(OutputPath)\Clojure.Tests.pdb;
$(OutputPath)\Clojure.Source.dll;$(OutputPath)\Clojure.Source.pdb;
$(OutputPath)\clojure.test-clojure.genclass.examples.ExampleClass.dll;
$(OutputPath)\clojure.test-clojure.genclass.examples.ExampleClass.pdb;
$(OutputPath)\Clojure.Main.vshost.exe;$(OutputPath)\Clojure.Main.vshost.exe.manifest">
<Output
TaskParameter="Include"
ItemName="Dlls"/>
</CreateItem>
<!--clj and AOT clj files-->
<CreateItem
Include="$(OutputPath)\clojure\**\*"
Exclude="$(OutputPath)\clojure\test_clojure\**\*">
<Output
TaskParameter="Include"
ItemName="CljFiles"/>
</CreateItem>
<Copy SourceFiles="@(Dlls)" DestinationFolder="..\dist\$(Configuration)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(CljFiles)" DestinationFolder="..\dist\$(Configuration)\clojure\%(RecursiveDir)" SkipUnchangedFiles="true" />
</Target>
<!-- Need to update whenever more DLLs are added to basic build -->
<Target Name="Ilmerge" DependsOnTargets="Build">
<MakeDir Directories="$(OutputPath)\ilmerge" />
<Exec Condition=" '$(Configuration)' == 'Release 4.0' "
Command="ilmerge /keyfile:%CLOJURE_SNK% /targetplatform:&quot;v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0&quot; /out:ilmerge/Clojure.dll Clojure.dll clojure.clr.io.clj.dll clojure.clr.shell.clj.dll clojure.core.clj.dll clojure.core.protocols.clj.dll clojure.core.reducers.clj.dll clojure.core_clr.clj.dll clojure.core_deftype.clj.dll clojure.core_print.clj.dll clojure.core_proxy.clj.dll clojure.data.clj.dll clojure.edn.clj.dll clojure.genclass.clj.dll clojure.gvec.clj.dll clojure.instant.clj.dll clojure.main.clj.dll clojure.pprint.clj.dll clojure.pprint.cl_format.clj.dll clojure.pprint.column_writer.clj.dll clojure.pprint.dispatch.clj.dll clojure.pprint.pprint_base.clj.dll clojure.pprint.pretty_writer.clj.dll clojure.pprint.print_table.clj.dll clojure.pprint.utilities.clj.dll clojure.reflect.clj.dll clojure.reflect.clr.clj.dll clojure.repl.clj.dll clojure.set.clj.dll clojure.stacktrace.clj.dll clojure.string.clj.dll clojure.template.clj.dll clojure.test.clj.dll clojure.test.junit.clj.dll clojure.test.tap.clj.dll clojure.uuid.clj.dll clojure.walk.clj.dll clojure.zip.clj.dll"
WorkingDirectory="$(OutputPath)" />
<Exec Condition=" '$(Configuration)' == 'Release 3.5' "
Command="ilmerge /keyfile:%CLOJURE_SNK% /out:ilmerge/Clojure.dll Clojure.dll clojure.clr.io.clj.dll clojure.clr.shell.clj.dll clojure.core.clj.dll clojure.core.protocols.clj.dll clojure.core.reducers.clj.dll clojure.core_clr.clj.dll clojure.core_deftype.clj.dll clojure.core_print.clj.dll clojure.core_proxy.clj.dll clojure.data.clj.dll clojure.edn.clj.dll clojure.genclass.clj.dll clojure.gvec.clj.dll clojure.instant.clj.dll clojure.main.clj.dll clojure.pprint.clj.dll clojure.pprint.cl_format.clj.dll clojure.pprint.column_writer.clj.dll clojure.pprint.dispatch.clj.dll clojure.pprint.pprint_base.clj.dll clojure.pprint.pretty_writer.clj.dll clojure.pprint.print_table.clj.dll clojure.pprint.utilities.clj.dll clojure.reflect.clj.dll clojure.reflect.clr.clj.dll clojure.repl.clj.dll clojure.set.clj.dll clojure.stacktrace.clj.dll clojure.string.clj.dll clojure.template.clj.dll clojure.test.clj.dll clojure.test.junit.clj.dll clojure.test.tap.clj.dll clojure.uuid.clj.dll clojure.walk.clj.dll clojure.zip.clj.dll"
WorkingDirectory="$(OutputPath)" />
</Target>
</Project>