Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

72 lines (64 sloc) 4.477 kb
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MonoDefaultClr>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Mono@DefaultCLR)</MonoDefaultClr>
<!-- yes, this is broken but MSBuild does not support recursive registry access (where registry path is parameterized)
so this will have to do. -->
<MonoInstallLocation Condition="'$(MonoInstallLocation)' == ''">$(ProgramFiles)\Mono-$(MonoDefaultClr)</MonoInstallLocation>
<MonoExists>false</MonoExists>
<MonoExists Condition="Exists('$(MonoInstallLocation)\bin\gmcs.bat')">true</MonoExists>
</PropertyGroup>
<PropertyGroup>
<OutputAssemblyPath>$(OutputPath)\$(AssemblyName).dll</OutputAssemblyPath>
<OutputAssemblyPath Condition=" '$(OutputType)' == 'Exe' ">$(OutputPath)\$(AssemblyName).exe</OutputAssemblyPath>
<ResponseFile>$(IntermediateOutputPath)\$(AssemblyName).rsp</ResponseFile>
</PropertyGroup>
<ItemGroup>
<_OutputAssemblyPathItem Include="$(OutputAssemblyPath)" />
</ItemGroup>
<Target Name="BuildReferencedProjects">
<MSBuild Projects="@(ProjectReference)">
<Output TaskParameter="TargetOutputs" ItemName="AssembliesBuiltByChildProjects" />
</MSBuild>
</Target>
<Target Name="Clean">
<Delete Files="$(OutputAssemblyPath)" />
</Target>
<Target Name="Build" Outputs="@(_OutputAssemblyPathItem -> '%(FullPath)', ';')" DependsOnTargets="BuildReferencedProjects" Inputs="@(AssembliesBuiltByChildProjects);@(Compile)" >
<Error Text="Mono installation was not detected. Use MonoInstallLocation property to override." Condition="'$(MonoExists)' == 'false'" />
<Message Text="Using Mono installation from $(MonoInstallLocation). Use MonoInstallLocation property to override." />
<MakeDir Directories="$(OutputPath)" />
<MakeDir Directories="$(IntermediateOutputPath)" />
<PropertyGroup>
<!-- build mono command line, very limited options for now -->
<MonoCommandLine>"$(MonoInstallLocation)\bin\gmcs.bat"</MonoCommandLine>
<MonoCommandLine Condition="'$(DefineConstants)' != ''">$(MonoCommandLine) /define:$(DefineConstants)</MonoCommandLine>
<MonoCommandLine Condition="'$(DocumentationFile)' != ''">$(MonoCommandLine) /doc:"$(DocumentationFile)"</MonoCommandLine>
<MonoCommandLine Condition="'$(DebugSymbols)' == 'true'">$(MonoCommandLine) /debug+</MonoCommandLine>
<MonoCommandLine Condition="'$(AssemblyOriginatorKeyFile)' != ''">$(MonoCommandLine) /keyfile:$(AssemblyOriginatorKeyFile)</MonoCommandLine>
<MonoCommandLine Condition="'$(Optimize)' == 'true'">$(MonoCommandLine) /optimize+</MonoCommandLine>
<MonoCommandLine Condition="'$(TreatWarningsAsErrors)' == 'true'">$(MonoCommandLine) /waraserror+</MonoCommandLine>
<MonoCommandLine Condition="'$(WarningLevel)' != ''">$(MonoCommandLine) /warn:$(WarningLevel)</MonoCommandLine>
<MonoCommandLine Condition="'$(OutputType)' == 'Exe'">$(MonoCommandLine) /target:exe</MonoCommandLine>
<MonoCommandLine Condition="'$(OutputType)' == 'Library'">$(MonoCommandLine) /target:library</MonoCommandLine>
<MonoCommandLine Condition="'$(NoWarn)' != ''">$(MonoCommandLine) /nowarn:$(NoWarn)</MonoCommandLine>
<MonoCommandLine>$(MonoCommandLine) /out:"$(OutputAssemblyPath)"</MonoCommandLine>
<MonoCommandLine>$(MonoCommandLine)@(Reference ->' /reference:"%(Identity)"', '')</MonoCommandLine>
<MonoCommandLine>$(MonoCommandLine)@(FileReference ->' /reference:"%(Identity)"', '')</MonoCommandLine>
<MonoCommandLine>$(MonoCommandLine) @"$(ResponseFile)"</MonoCommandLine>
<MonoCommandLine>$(MonoCommandLine)@(AssembliesBuiltByChildProjects ->' /reference:"%(Identity)"', '')</MonoCommandLine>
</PropertyGroup>
<WriteLinesToFile File="$(ResponseFile)" Lines="@(Compile->' &quot;%(Identity)&quot;', '')" Overwrite="true" />
<Exec Command="$(MonoCommandLine)"/>
<Copy SourceFiles="@(AssembliesBuiltByChildProjects)" DestinationFolder="$(OutputPath)" />
</Target>
<Target Name="ReBuildReferencedProjects">
<MSBuild Projects="@(ProjectReference)" Targets="Rebuild">
<Output TaskParameter="TargetOutputs" ItemName="AssembliesBuiltByChildProjects" />
</MSBuild>
</Target>
<Target Name="Rebuild" DependsOnTargets="RebuildReferencedProjects">
<CallTarget Targets="Clean" />
<CallTarget Targets="Build" />
</Target>
</Project>
Jump to Line
Something went wrong with that request. Please try again.