xamarin-android/build-tools/mono-runtimes/mono-runtimes.targets

660 строки
33 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitCommitTime" />
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
<PropertyGroup>
<_SourceTopDir>..\..</_SourceTopDir>
<_BclFrameworkDir>$(XAInstallPrefix)xbuild-frameworks\MonoAndroid\v1.0\</_BclFrameworkDir>
<_MSBuildDir>$(XAInstallPrefix)xbuild\Xamarin\Android</_MSBuildDir>
<_OutputIncludeDir>..\..\bin\$(Configuration)\include\</_OutputIncludeDir>
<_DebugFileExt Condition=" '$(_DebugFileExt)' == '' ">.pdb</_DebugFileExt>
</PropertyGroup>
<ItemGroup>
<MonoDocCopyItem Include="monodoc.dll" />
<MonoDocCopyItem
Condition=" '$(_DebugFileExt)' == '.pdb'"
Include="mdoc.pdb;monodoc.pdb"
/>
<MonoDocCopyItem
Condition=" '$(_DebugFileExt)' == '.mdb'"
Include="mdoc.exe.mdb;monodoc.dll.mdb"
/>
<MonoDocCopyItem Include="monodoc.dll.config" />
</ItemGroup>
<UsingTask AssemblyFile="$(_SourceTopDir)\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.GetNugetPackageBasePath" />
<ItemGroup>
<_MonoDocCopyItems Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')" />
</ItemGroup>
<ItemGroup>
<_MonoDocInstalledItems Include="@(MonoDocCopyItem->'$(_MSBuildDir)\%(Identity)')" />
<_MonoDocInstalledItems Include="$(_MSBuildDir)\mdoc.exe" />
</ItemGroup>
<PropertyGroup>
<_MonoProfileDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid</_MonoProfileDir>
<_MonoOutputDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid_tools</_MonoOutputDir>
</PropertyGroup>
<PropertyGroup>
<ForceBuildDependsOn>
_BuildLlvm;
_InstallLlvm;
_Autogen;
_ConfigureRuntimes;
_BuildRuntimes;
_InstallRuntimes;
_InstallBcl;
_InstallCilStrip;
_InstallMonoDoc;
_InstallMonoUtilities;
_ConfigureCrossRuntimes;
_BuildCrossRuntimes;
_InstallCrossRuntimes;
</ForceBuildDependsOn>
</PropertyGroup>
<Import Project="mono-runtimes.props" />
<Import Project="mono-runtimes.projitems" />
<Import Project="ProfileAssemblies.projitems" />
<ItemGroup>
<_BclAssembly Include="@(MonoProfileAssembly)" />
<_BclExcludeDebugSymbols Include="System.Windows.dll" />
<_BclExcludeDebugSymbols Include="System.Xml.Serialization.dll" />
<_BclTestAssemblySource Include="@(MonoTestAssembly->'$(MonoSourceFullPath)\mcs\class\%(SourcePath)\%(Identity)')" />
<_BclTestAssemblySource Include="@(MonoTestAssembly->'$(MonoSourceFullPath)\mcs\class\%(SourcePath)\%(Filename).pdb')" />
<_BclTestAssemblyDestination Include="@(MonoTestAssembly->'$(XAInstallPrefix)\..\..\bcl-tests\%(Identity)')" />
<_BclTestAssemblyDestination Include="@(MonoTestAssembly->'$(XAInstallPrefix)\..\..\bcl-tests\%(Filename).pdb')" />
</ItemGroup>
<ItemGroup>
<_BclTestOutput Include="@(_BclTestAssemblyDestination)" />
<_BclTestOutput Include="$(XAInstallPrefix)\..\..\bcl-tests\bcl-tests.zip" />
</ItemGroup>
<ItemGroup>
<_BclProfileItems Include="@(_BclAssembly->'$(_MonoProfileDir)\%(Identity)')" />
<_BclProfileItems
Condition=" '$(_DebugFileExt)' == '.mdb' "
Include="@(_BclAssembly->'$(_MonoProfileDir)\%(Identity).mdb')"
Exclude="@(_BclExcludeDebugSymbols->'$(_MonoProfileDir)\%(Identity).mdb')"
/>
<_BclProfileItems
Condition=" '$(_DebugFileExt)' == '.pdb' "
Include="@(_BclAssembly->'$(_MonoProfileDir)\%(Filename).pdb')"
Exclude="@(_BclExcludeDebugSymbols->'$(_MonoProfileDir)\%(Filename).pdb')"
/>
</ItemGroup>
<ItemGroup>
<_BclInstalledItem Include="@(_BclAssembly->'$(_BclFrameworkDir)%(Identity)')" />
<_BclInstalledItem
Condition=" '$(_DebugFileExt)' == '.mdb' "
Include="@(_BclAssembly->'$(_BclFrameworkDir)%(Identity).mdb')"
Exclude="@(_BclExcludeDebugSymbols->'$(_BclFrameworkDir)%(Identity).mdb')"
/>
<_BclInstalledItem
Condition=" '$(_DebugFileExt)' == '.pdb' "
Include="@(_BclAssembly->'$(_BclFrameworkDir)%(Filename).pdb')"
Exclude="@(_BclExcludeDebugSymbols->'$(_BclFrameworkDir)%(Filename).pdb')"
/>
</ItemGroup>
<ItemGroup>
<_MonoUtility Include="mono-symbolicate.exe" />
<_MonoUtility Include="mkbundle.exe" />
</ItemGroup>
<ItemGroup>
<_MonoUtilitySource Include="@(_MonoUtility->'$(_MonoOutputDir)\%(Identity)')" />
<_MonoUtilityDest Include="@(_MonoUtility->'$(_MSBuildDir)\%(Identity)')" />
<_MonoUtilitySource
Condition=" '$(_DebugFileExt)' == '.mdb'"
Include="@(_MonoUtility->'$(_MonoOutputDir)\%(Identity).mdb')"
/>
<_MonoUtilityDest
Condition=" '$(_DebugFileExt)' == '.mdb'"
Include="@(_MonoUtility->'$(_MSBuildDir)\%(Identity).mdb')"
/>
<_MonoUtilitySource
Condition=" '$(_DebugFileExt)' == '.pdb'"
Include="@(_MonoUtility->'$(_MonoOutputDir)\%(Filename).pdb')"
/>
<_MonoUtilityDest
Condition=" '$(_DebugFileExt)' == '.pdb'"
Include="@(_MonoUtility->'$(_MSBuildDir)\%(Filename).pdb')"
/>
</ItemGroup>
<Target Name="_SetAutogenShTimeToLastCommitTimestamp">
<GitCommitTime
WorkingDirectory="$(MonoSourceFullPath)"
ToolPath="$(GitToolPath)"
ToolExe="$(GitToolExe)">
<Output TaskParameter="Time" PropertyName="_MonoCommitTime" />
</GitCommitTime>
<Touch Files="$(MonoSourceFullPath)\autogen.sh" Time="$(_MonoCommitTime)" />
<GitCommitTime
WorkingDirectory="$(LlvmSourceFullPath)"
ToolPath="$(GitToolPath)"
ToolExe="$(GitToolExe)">
<Output TaskParameter="Time" PropertyName="_LlvmCommitTime" />
</GitCommitTime>
<Touch Files="$(LlvmSourceFullPath)\Makefile.config.in" Time="$(_LlvmCommitTime)" />
</Target>
<Target Name="_PrepareLlvmItems">
<ItemGroup>
<_LlvmSourceFile Include="$(LlvmSourceFullPath)\lib\**\*.cpp" />
<_LlvmHeaderFile Include="$(LlvmSourceFullPath)\lib\**\*.h" />
<_LlvmMakefileConfig Include="@(_LlvmRuntime->'$(_LlvmOutputDirTop)\%(BuildDir)\Makefile.config')" />
<_LlvmConfigureStamp Include="@(_LlvmRuntime->'$(_LlvmOutputDirTop)\%(BuildDir)\.stamp-configure')" />
</ItemGroup>
<ItemGroup>
<_LlvmArchive Include="$(_LlvmOutputDirTop)\%(_LlvmRuntime.BuildDir)\Release\lib\*.a" />
<_LlvmSourceBinary Include="@(_LlvmRuntime->'$(_LlvmOutputDirTop)\%(BuildDir)\Release\bin\opt%(ExeSuffix)')" Condition=" '%(_LlvmRuntime.InstallBinaries)' == 'true' " />
<_LlvmTargetBinary Include="@(_LlvmRuntime->'$(_MSBuildDir)\%(InstallPath)opt%(ExeSuffix)')" Condition=" '%(_LlvmRuntime.InstallBinaries)' == 'true' "/>
<_LlvmSourceBinary Include="@(_LlvmRuntime->'$(_LlvmOutputDirTop)\%(BuildDir)\Release\bin\llc%(ExeSuffix)')" Condition=" '%(_LlvmRuntime.InstallBinaries)' == 'true' " />
<_LlvmTargetBinary Include="@(_LlvmRuntime->'$(_MSBuildDir)\%(InstallPath)llc%(ExeSuffix)')" Condition=" '%(_LlvmRuntime.InstallBinaries)' == 'true' " />
</ItemGroup>
</Target>
<Target Name="_ConfigureLlvm"
DependsOnTargets="_PrepareLlvmItems"
Inputs="$(LlvmSourceFullPath)\Makefile.config.in;$(LlvmSourceFullPath)\configure;@(_LlvmSourceFile);@(_LlvmHeaderFile)"
Outputs="@(_LlvmMakefileConfig);@(_LlvmConfigureStamp)"
Condition=" $(_LlvmNeeded) != '' ">
<MakeDir Directories="$(_LlvmOutputDirTop)\%(_LlvmRuntime.BuildDir)" />
<Exec
Command="%(_LlvmRuntime.ConfigureEnvironment) $(LlvmSourceFullPath)\configure %(_LlvmRuntime.ConfigureFlags)"
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(_LlvmOutputDirTop)\%(_LlvmRuntime.BuildDir)"
/>
<Touch
Files="$(_LlvmOutputDirTop)\%(_LlvmRuntime.BuildDir)\Makefile.config"
/>
<Touch
Files="$(_LlvmOutputDirTop)\%(_LlvmRuntime.BuildDir)\.stamp-configure"
AlwaysCreate="true"
/>
</Target>
<Target Name="_BuildLlvm"
DependsOnTargets="_ConfigureLlvm"
Inputs="@(_LlvmConfigureStamp);@(_LlvmSourceFile);@(_LlvmHeaderFile)"
Outputs="@(_LlvmArchive);@(_LlvmSourceBinary)"
Condition=" '$(_LlvmNeeded)' != '' ">
<Exec
Command="%(_LlvmRuntime.BuildEnvironment) make $(MakeConcurrency) all install"
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(_LlvmOutputDirTop)\%(_LlvmRuntime.BuildDir)"
/>
<Touch
Files="@(_LlvmArchive);@(_LlvmTargetBinary)"
/>
</Target>
<Target Name="_InstallLlvm"
DependsOnTargets="_BuildLlvm"
Inputs="@(_LlvmSourceBinary)"
Outputs="@(_LlvmTargetBinary)"
Condition=" '$(_LlvmNeeded)' != '' ">
<Copy
SourceFiles="@(_LlvmSourceBinary)"
DestinationFiles="@(_LlvmTargetBinary)" />
<Touch
Files="@(_LlvmTargetBinary)" />
</Target>
<Target Name="_Autogen"
DependsOnTargets="_SetAutogenShTimeToLastCommitTimestamp"
Inputs="$(MonoSourceFullPath)\autogen.sh"
Outputs="$(MonoSourceFullPath)\configure">
<Exec
Command="NOCONFIGURE=1 ./autogen.sh"
WorkingDirectory="$(MonoSourceFullPath)"
/>
</Target>
<Target Name="_ConfigureRuntimes"
DependsOnTargets="_BuildLlvm;_Autogen"
Inputs="$(MonoSourceFullPath)\configure"
Outputs="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)\Makefile">
<MakeDir Directories="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)" />
<Exec
Command="$(MonoSourceFullPath)\configure LDFLAGS=&quot;%(_MonoRuntime.LdFlags)&quot; CFLAGS=&quot;%(_MonoRuntime.CFlags)&quot; CXXFLAGS=&quot;%(_MonoRuntime.CxxFlags)&quot; CC=&quot;%(_MonoRuntime.Cc)&quot; CXX=&quot;%(_MonoRuntime.Cxx)&quot; CPP=&quot;%(_MonoRuntime.Cpp)&quot; CXXCPP=&quot;%(_MonoRuntime.CxxCpp)&quot; LD=&quot;%(_MonoRuntime.Ld)&quot; AR=&quot;%(_MonoRuntime.Ar)&quot; AS=&quot;%(_MonoRuntime.As)&quot; RANLIB=&quot;%(_MonoRuntime.RanLib)&quot; STRIP=&quot;%(_MonoRuntime.Strip)&quot; DLLTOOL=&quot;%(_MonoRuntime.DllTool)&quot; OBJDUMP=&quot;%(_MonoRuntime.Objdump)&quot; --cache-file=..\%(_MonoRuntime.Identity).config.cache %(_MonoRuntime.ConfigureFlags)"
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)"
/>
<Touch
Files="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)\.stamp"
AlwaysCreate="True"
/>
</Target>
<Target Name="_GetRuntimesOutputItems">
<ItemGroup>
<_RuntimeSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\mini\.libs\%(OutputRuntimeFilename).%(NativeLibraryExtension)')"
/>
<_InstallRuntimeOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputRuntimeFilename).%(NativeLibraryExtension)')"
/>
<_InstallUnstrippedRuntimeOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputRuntimeFilename).d.%(NativeLibraryExtension)')"
/>
<_ProfilerSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputProfilerFilename)' != '' "
Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\profiler\.libs\%(OutputProfilerFilename).%(NativeLibraryExtension)')"
/>
<_InstallProfilerOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputProfilerFilename)' != '' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputProfilerFilename).%(NativeLibraryExtension)')"
/>
<_InstallUnstrippedProfilerOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputProfilerFilename)' != '' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputProfilerFilename).d.%(NativeLibraryExtension)')"
/>
<_MonoBtlsSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputMonoBtlsFilename)' != '' "
Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\btls\build-shared\%(OutputMonoBtlsFilename).%(NativeLibraryExtension)')"
/>
<_InstallMonoBtlsOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputMonoBtlsFilename)' != '' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputMonoBtlsFilename).%(NativeLibraryExtension)')"
/>
<_InstallUnstrippedMonoBtlsOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputMonoBtlsFilename)' != '' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputMonoBtlsFilename).d.%(NativeLibraryExtension)')"
/>
<_MonoPosixHelperSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputMonoPosixHelperFilename)' != '' "
Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\support\.libs\%(OutputMonoPosixHelperFilename).%(NativeLibraryExtension)')"
/>
<_InstallMonoPosixHelperOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputMonoPosixHelperFilename)' != '' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputMonoPosixHelperFilename).%(NativeLibraryExtension)')"
/>
<_InstallUnstrippedMonoPosixHelperOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' And '%(_MonoRuntime.OutputMonoPosixHelperFilename)' != '' "
Include="@(_MonoRuntime->'$(_MSBuildDir)\lib\%(Identity)\%(OutputMonoPosixHelperFilename).d.%(NativeLibraryExtension)')"
/>
<_RuntimeEglibHeaderSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\eglib\eglib-config.h')"
/>
<_RuntimeEglibHeaderOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
Include="@(_MonoRuntime->'$(_OutputIncludeDir)%(Identity)\eglib\eglib-config.h')"
/>
<_MonoConstsSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
Include="$(MonoSourceFullPath)\mcs\build\common\Consts.cs"
/>
<_MonoConstsOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
Include="$(_OutputIncludeDir)Consts.cs"
/>
<_RuntimeBuildStamp Condition=" '%(_MonoRuntime.DoBuild)' == 'true' " Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\.stamp')" />
</ItemGroup>
</Target>
<Target Name="_BuildRuntimes"
DependsOnTargets="_GetRuntimesOutputItems;_ConfigureRuntimes"
Inputs="@(_RuntimeBuildStamp)"
Outputs="@(_RuntimeSource);@(_ProfilerSource);@(_MonoPosixHelperSource);@(_BclProfileItems);@(_MonoBtlsSource);@(_BclTestOutput)">
<Exec
Condition=" '%(_MonoRuntime.DoBuild)' == 'true' "
Command="make $(MakeConcurrency) # %(_MonoRuntime.Identity)"
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)"
/>
<Touch
Files="@(_RuntimeSource);@(_ProfilerSource);@(_MonoPosixHelperSource);@(_BclProfileItems);@(_MonoBtlsSource)"
/>
<Exec
Command="make $(MakeConcurrency) test # %(_MonoRuntime.Identity)"
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)\runtime"
/>
<Copy
SourceFiles="@(_BclTestAssemblySource)"
DestinationFiles="@(_BclTestAssemblyDestination)"
/>
<Touch
Files="@(_BclTestAssemblyDestination)"
/>
<ItemGroup>
<_BclTestContent Include="$(MonoSourceFullPath)\mcs\class\%(MonoTestAssembly.SourcePath)\Test\**\*.*" />
<_BclTestContent Remove="$(MonoSourceFullPath)\mcs\class\%(MonoTestAssembly.SourcePath)\Test\**\*.cs" />
<_BclTestContent Remove="$(MonoSourceFullPath)\mcs\class\%(MonoTestAssembly.SourcePath)\Test\**\.gitattributes" />
<_BclTestContentDest Include="@(_BclTestContent->'$(XAInstallPrefix)\..\..\bcl-tests\Test\%(RecursiveDir)%(Filename)%(Extension)')" />
</ItemGroup>
<ItemGroup>
<_BclTestContent Include="$(MonoSourceFullPath)\mcs\class\System.IO.Compression\test.nupkg" />
<_BclTestContentDest Include="$(XAInstallPrefix)\..\..\bcl-tests\test.nupkg" />
<_BclTestContent Include="$(MonoSourceFullPath)\mcs\class\System.IO.Compression\archive.zip" />
<_BclTestContentDest Include="$(XAInstallPrefix)\..\..\bcl-tests\archive.zip" />
</ItemGroup>
<ItemGroup>
<_ZipTestContent Include="$(MonoSourceFullPath)\mcs\class\System.IO.Compression.FileSystem\foo\**\*.*" />
<_ZipTestContentDest Include="@(_ZipTestContent->'$(XAInstallPrefix)\..\..\bcl-tests\foo\%(RecursiveDir)%(Filename)%(Extension)')" />
<_BclTestContent Include="@(_ZipTestContent)" />
<_BclTestContentDest Include="@(_ZipTestContentDest)" />
</ItemGroup>
<Copy
SourceFiles="@(_BclTestContent)"
DestinationFiles="@(_BclTestContentDest)"
/>
<Exec
Condition="!Exists('$(XAInstallPrefix)\..\..\bcl-tests\Test\test.db')"
Command="sqlite3 &quot;$(XAInstallPrefix)\..\..\bcl-tests\Test\test.db&quot; &lt; &quot;$(MonoSourceFullPath)\mcs\class\Mono.Data.Sqlite\Test\test.sql&quot;"
/>
<Exec
Command="zip -r bcl-tests.zip ."
WorkingDirectory="$(XAInstallPrefix)\..\..\bcl-tests"
/>
<Touch
Files="$(XAInstallPrefix)\..\..\bcl-tests\bcl-tests.zip"
/>
</Target>
<Target Name="_InstallRuntimes"
DependsOnTargets="_GetRuntimesOutputItems"
Inputs="@(_RuntimeSource);@(_ProfilerSource);@(_MonoPosixHelperSource);@(_RuntimeEglibHeaderSource)"
Outputs="@(_InstallRuntimeOutput);@(_InstallProfilerOutput);@(_InstallMonoPosixHelperOutput);@(_RuntimeEglibHeaderOutput)">
<MakeDir
Condition=" '%(_MonoRuntime.DoBuild)' == 'true' "
Directories="$(_MSBuildDir)\lib\%(_MonoRuntime.Identity)"
/>
<MakeDir
Condition=" '%(_MonoRuntime.DoBuild)' == 'true' "
Directories="$(_OutputIncludeDir)%(_MonoRuntime.Identity)\eglib"
/>
<Copy
SourceFiles="@(_RuntimeEglibHeaderSource)"
DestinationFiles="@(_RuntimeEglibHeaderOutput)"
/>
<Touch Files="@(_RuntimeEglibHeaderOutput)" />
<Copy
SourceFiles="@(_MonoConstsSource)"
DestinationFiles="@(_MonoConstsOutput)"
/>
<Touch Files="@(_MonoConstsOutput)" />
<Copy
SourceFiles="@(_RuntimeSource)"
DestinationFiles="@(_InstallRuntimeOutput)"
/>
<Copy
SourceFiles="@(_RuntimeSource)"
DestinationFiles="@(_InstallUnstrippedRuntimeOutput)"
/>
<Exec
Condition=" ('$(Configuration)' != 'Debug' Or '%(_MonoRuntime.NativeLibraryExtension)' == 'dll') And '%(_MonoRuntime.DoBuild)' == 'true' "
Command="&quot;%(_MonoRuntime.Strip)&quot; %(_MonoRuntime.StripFlags) &quot;$(_MSBuildDir)\lib\%(_MonoRuntime.Identity)\%(_MonoRuntime.OutputRuntimeFilename).%(_MonoRuntime.NativeLibraryExtension)&quot;"
/>
<Touch Files="@(_InstallRuntimeOutput);@(_InstallUnstrippedRuntimeOutput)" />
<Copy
SourceFiles="@(_ProfilerSource)"
DestinationFiles="@(_InstallProfilerOutput)"
/>
<Copy
SourceFiles="@(_ProfilerSource)"
DestinationFiles="@(_InstallUnstrippedProfilerOutput)"
/>
<Exec
Condition=" '$(Configuration)' != 'Debug' And '%(_MonoRuntime.DoBuild)' == 'true' And '%(_MonoRuntime.OutputProfilerFilename)' != '' "
Command="&quot;%(_MonoRuntime.Strip)&quot; %(_MonoRuntime.StripFlags) &quot;$(_MSBuildDir)\lib\%(_MonoRuntime.Identity)\%(_MonoRuntime.OutputProfilerFilename).%(_MonoRuntime.NativeLibraryExtension)&quot;"
/>
<Touch Files="@(_InstallProfilerOutput);@(_InstallUnstrippedProfilerOutput)" />
<Copy
SourceFiles="@(_MonoBtlsSource)"
DestinationFiles="@(_InstallMonoBtlsOutput)"
/>
<Copy
SourceFiles="@(_MonoBtlsSource)"
DestinationFiles="@(_InstallUnstrippedMonoBtlsOutput)"
/>
<Exec
Condition=" '$(Configuration)' != 'Debug' And '%(_MonoRuntime.DoBuild)' == 'true' And '%(_MonoRuntime.OutputMonoBtlsFilename)' != '' "
Command="&quot;%(_MonoRuntime.Strip)&quot; %(_MonoRuntime.StripFlags) &quot;$(_MSBuildDir)\lib\%(_MonoRuntime.Identity)\%(_MonoRuntime.OutputMonoBtlsFilename).%(_MonoRuntime.NativeLibraryExtension)&quot;"
/>
<Touch Files="@(_InstallMonoBtlsOutput);@(_InstallUnstrippedMonoBtlsOutput)" />
<Copy
SourceFiles="@(_MonoPosixHelperSource)"
DestinationFiles="@(_InstallMonoPosixHelperOutput)"
/>
<Copy
SourceFiles="@(_MonoPosixHelperSource)"
DestinationFiles="@(_InstallUnstrippedMonoPosixHelperOutput)"
/>
<Exec
Condition=" '$(Configuration)' != 'Debug' And '%(_MonoRuntime.DoBuild)' == 'true' And '%(_MonoRuntime.OutputMonoPosixHelperFilename)' != '' "
Command="&quot;%(_MonoRuntime.Strip)&quot; %(_MonoRuntime.StripFlags) &quot;$(_MSBuildDir)\lib\%(_MonoRuntime.Identity)\%(_MonoRuntime.OutputMonoPosixHelperFilename).%(_MonoRuntime.NativeLibraryExtension)&quot;"
/>
<Touch Files="@(_InstallMonoPosixHelperOutput);@(_InstallUnstrippedMonoPosixHelperOutput)" />
</Target>
<ItemGroup>
<_MonoCilStripSource Include="$(_MonoOutputDir)\mono-cil-strip.exe" />
<_MonoCilStripDest Include="$(_MSBuildDir)\cil-strip.exe" />
<_MonoCilStripSource
Condition=" '$(_DebugFileExt)' == '.mdb' "
Include="$(_MonoOutputDir)\mono-cil-strip.exe.mdb"
/>
<_MonoCilStripDest
Condition=" '$(_DebugFileExt)' == '.mdb' "
Include="$(_MonoOutputDir)\cil-strip.exe.mdb"
/>
<_MonoCilStripSource
Condition=" '$(_DebugFileExt)' == '.pdb' "
Include="$(_MonoOutputDir)\mono-cil-strip.pdb"
/>
<_MonoCilStripDest
Condition=" '$(_DebugFileExt)' == '.pdb' "
Include="$(_MSBuildDir)\cil-strip.pdb"
/>
</ItemGroup>
<Target Name="_InstallCilStrip"
Inputs="@(_MonoCilStripSource)"
Outputs="@(_MonoCilStripDest)">
<MakeDir Directories="$(_MSBuildDir)" />
<Copy
SourceFiles="@(_MonoCilStripSource)"
DestinationFiles="@(_MonoCilStripDest)"
/>
</Target>
<Target Name="_InstallMonoDoc"
Inputs="@(_MonoDocCopyItems);$(_MonoOutputDir)\mdoc.exe"
Outputs="@(_MonoDocInstalledItems)">
<MakeDir Directories="$(_MSBuildDir)" />
<Copy
SourceFiles="@(_MonoDocCopyItems)"
DestinationFolder="$(_MSBuildDir)"
/>
<Exec
Command="$(RemapAssemblyRefTool) &quot;$(_MonoOutputDir)\mdoc.exe&quot; &quot;$(_MSBuildDir)\mdoc.exe&quot; Mono.Cecil &quot;..\..\bin\Build$(Configuration)\Xamarin.Android.Cecil.dll&quot;"
/>
<Touch
Files="@(_MonoDocInstalledItems)"
/>
</Target>
<Target Name="_InstallMonoUtilities"
Inputs="@(_MonoUtilitySource)"
Outputs="@(_MonoUtilityDest)">
<MakeDir Directories="$(_MSBuildDir)" />
<Copy
SourceFiles="@(_MonoUtilitySource)"
DestinationFiles="@(_MonoUtilityDest)"
/>
</Target>
<Target Name="_InstallBcl"
Inputs="@(_BclProfileItems)"
Outputs="@(_BclInstalledItem);$(_BclFrameworkDir)RedistList\FrameworkList.xml">
<MakeDir Directories="$(_BclFrameworkDir)" />
<MakeDir Directories="$(_BclFrameworkDir)RedistList" />
<MakeDir Directories="$(_BclFrameworkDir)Facades" />
<ItemGroup>
<_PackageConfigFiles Include="$(_SourceTopDir)\src\Xamarin.Android.Build.Tasks\packages.config" />
</ItemGroup>
<ItemGroup>
<_Facades Include="$(_MonoProfileDir)\Facades\*.dll" />
</ItemGroup>
<Copy
SourceFiles="@(_BclProfileItems)"
DestinationFiles="@(_BclInstalledItem)"
/>
<Copy
SourceFiles="@(_Facades)"
DestinationFolder="$(_BclFrameworkDir)Facades"
/>
<Touch
Files="@(_BclInstalledItem)"
/>
<ItemGroup>
<FrameworkList Include="&lt;FileList Redist=&quot;MonoAndroid&quot; Name=&quot;Xamarin.Android Base Class Libraries&quot;&gt;" />
<FrameworkList Include="&lt;/FileList&gt;" />
</ItemGroup>
<WriteLinesToFile
File="$(_BclFrameworkDir)RedistList\FrameworkList.xml"
Lines="@(FrameworkList)"
Overwrite="True"
/>
</Target>
<!-- The condition below is to work around a bug in xbuild which attempts to batch
even if there are no _MonoCrossRuntime items and the Copy task fails
-->
<Target Name="_ConfigureCrossRuntimes"
DependsOnTargets="_BuildLlvm"
Inputs="$(MonoSourceFullPath)\configure"
Outputs="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\Makefile;$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\.stamp"
Condition=" '@(_MonoCrossRuntime)' != '' ">
<Message Text="Configuring %(_MonoCrossRuntime.Identity) in $(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)"/>
<MakeDir Directories="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)" />
<Exec
Command="%(_MonoCrossRuntime.ConfigureEnvironment) $(MonoSourceFullPath)\configure LDFLAGS=&quot;%(_MonoCrossRuntime.LdFlags)&quot; CFLAGS=&quot;%(_MonoCrossRuntime.CFlags)&quot; CXXFLAGS=&quot;%(_MonoCrossRuntime.CxxFlags)&quot; CC=&quot;%(_MonoCrossRuntime.Cc)&quot; CXX=&quot;%(_MonoCrossRuntime.Cxx)&quot; CPP=&quot;%(_MonoCrossRuntime.Cpp)&quot; CXXCPP=&quot;%(_MonoCrossRuntime.CxxCpp)&quot; LD=&quot;%(_MonoCrossRuntime.Ld)&quot; AR=&quot;%(_MonoCrossRuntime.Ar)&quot; AS=&quot;%(_MonoCrossRuntime.As)&quot; RANLIB=&quot;%(_MonoCrossRuntime.RanLib)&quot; STRIP=&quot;%(_MonoCrossRuntime.Strip)&quot; DLLTOOL=&quot;%(_MonoCrossRuntime.DllTool)&quot; OBJDUMP=&quot;%(_MonoCrossRuntime.Objdump)&quot; --cache-file=..\%(_MonoCrossRuntime.Identity).config.cache %(_MonoCrossRuntime.ConfigureFlags)"
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)"
/>
<Touch
Files="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\.stamp"
AlwaysCreate="True"
/>
</Target>
<Target Name="_GenerateCrossOffsetHeaderFiles"
Inputs="$(MonoSourceFullPath)\configure"
Outputs="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\%(_MonoCrossRuntime.TargetAbi).h"
Condition=" '@(_MonoCrossRuntime)' != '' ">
<Exec
Command="make $(_AotOffsetsDumperName)"
WorkingDirectory="$(_AotOffsetsDumperSourceDir)"
/>
<PropertyGroup>
<_CppAbiDir Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">osx_32</_CppAbiDir>
<_CppAbiArch Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))">--arch=32</_CppAbiArch>
<_CppAbiDir Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">linux_64</_CppAbiDir>
<_CppAbiArch Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))"></_CppAbiArch>
</PropertyGroup>
<Exec
Command="MONO_PATH=$(_AotOffsetsDumperSourceDir)\CppSharp\$(_CppAbiDir) $(ManagedRuntime) $(_CppAbiArch) $(_AotOffsetsDumperSourceDir)\$(_AotOffsetsDumperName) --android-ndk=&quot;$(AndroidNdkFullPath)&quot; --mono=&quot;$(MonoSourceFullPath)&quot; --monodroid=&quot;$(XamarinAndroidSourcePath)&quot; --abi=&quot;%(_MonoCrossRuntime.TargetAbi)&quot; --targetdir=&quot;$(MSBuildThisFileDirectory)$(IntermediateOutputPath)\%(_MonoCrossRuntime.JitArch)&quot; --out=&quot;$(MSBuildThisFileDirectory)$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)&quot;"
WorkingDirectory="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)"
/>
<Touch
Files="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\%(_MonoCrossRuntime.OffsetsHeaderFile)"
/>
</Target>
<!-- The condition below is to work around a bug in xbuild which attempts to batch
even if there are no _MonoCrossRuntime items and the Copy task fails
-->
<Target Name="_BuildCrossRuntimes"
DependsOnTargets="_GenerateCrossOffsetHeaderFiles"
Inputs="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\.stamp"
Outputs="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\mono\mini\mono-sgen%(_MonoCrossRuntime.ExeSuffix)"
Condition=" '@(_MonoCrossRuntime)' != '' ">
<Message Text="Building %(_MonoCrossRuntime.Identity) in $(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)"/>
<Exec
Command="%(_MonoCrossRuntime.BuildEnvironment) make $(MakeConcurrency)"
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)"
/>
<Touch
Files="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\mono\mini\mono-sgen%(_MonoCrossRuntime.ExeSuffix)"
/>
</Target>
<!-- The condition below is to work around a bug in xbuild which attempts to batch
even if there are no _MonoCrossRuntime items and the Copy task fails
-->
<Target Name="_InstallCrossRuntimes"
Inputs="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\mono\mini\mono-sgen%(_MonoCrossRuntime.ExeSuffix)"
Outputs="$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName)%(_MonoCrossRuntime.ExeSuffix)"
Condition=" '@(_MonoCrossRuntime)' != '' ">
<Copy
SourceFiles="$(IntermediateOutputPath)\%(_MonoCrossRuntime.Identity)\mono\mini\mono-sgen%(_MonoCrossRuntime.ExeSuffix)"
DestinationFiles="$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName)%(_MonoCrossRuntime.ExeSuffix)"
/>
<Copy
SourceFiles="$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName)%(_MonoCrossRuntime.ExeSuffix)"
DestinationFiles="$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName).d%(_MonoCrossRuntime.ExeSuffix)"
/>
<Exec
Condition=" '$(Configuration)' != 'Debug' Or '%(_MonoCrossRuntime.ExeSuffix)' == '.exe' "
Command="&quot;%(_MonoCrossRuntime.Strip)&quot; %(_MonoCrossRuntime.StripFlags) &quot;$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName)%(_MonoCrossRuntime.ExeSuffix)&quot;"
/>
<Touch
Files="$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName)%(_MonoCrossRuntime.ExeSuffix)"
/>
</Target>
<Target Name="GetMonoBundleItems"
DependsOnTargets="_GetRuntimesOutputItems;_PrepareLlvmItems">
<ItemGroup>
<BundleItem Include="@(_BclInstalledItem)" />
<BundleItem Include="@(_MonoDocInstalledItems)" />
<BundleItem Include="@(_MonoCilStripDest)" />
<BundleItem Include="@(_MonoUtilityDest)" />
<BundleItem Include="@(MonoFacadeAssembly->'$(_BclFrameworkDir)Facades\%(Identity)')" />
<BundleItem Include="$(_BclFrameworkDir)RedistList\FrameworkList.xml" />
<BundleItem Include="@(_InstallRuntimeOutput)" />
<BundleItem Include="@(_InstallUnstrippedRuntimeOutput)" />
<BundleItem Include="@(_InstallProfilerOutput)" />
<BundleItem Include="@(_InstallUnstrippedProfilerOutput)" />
<BundleItem Include="@(_InstallMonoBtlsOutput)" />
<BundleItem Include="@(_InstallUnstrippedMonoBtlsOutput)" />
<BundleItem Include="@(_InstallMonoPosixHelperOutput)" />
<BundleItem Include="@(_InstallUnstrippedMonoPosixHelperOutput)" />
<BundleItem Include="@(_RuntimeEglibHeaderOutput)" />
<BundleItem Include="@(_MonoConstsOutput)" />
<BundleItem Include="@(_LlvmTargetBinary)" />
<BundleItem Include="$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName).d%(_MonoCrossRuntime.ExeSuffix)"
Condition=" '@(_MonoCrossRuntime)' != '' "
/>
<BundleItem Include="$(_MSBuildDir)\%(_MonoCrossRuntime.InstallPath)%(_MonoCrossRuntime.CrossMonoName)%(_MonoCrossRuntime.ExeSuffix)"
Condition=" '@(_MonoCrossRuntime)' != '' "
/>
<BundleItem Include="@(_BclTestOutput)" />
</ItemGroup>
</Target>
<Target Name="ForceBuild"
DependsOnTargets="GetMonoBundleItems;$(ForceBuildDependsOn)"
Inputs="$(MonoSourceFullPath)\autogen.sh;$(LlvmSourceFullPath)\Makefile.config.in"
Outputs="@(BundleItem)">
</Target>
<Target Name="_BuildUnlessCached"
DependsOnTargets="_SetAutogenShTimeToLastCommitTimestamp;GetMonoBundleItems"
Inputs="$(MonoSourceFullPath)\autogen.sh;$(LlvmSourceFullPath)\Makefile.config.in"
Outputs="@(BundleItem)">
<PropertyGroup>
<_Now>$([System.DateTime]::Now.Ticks)</_Now>
</PropertyGroup>
<MSBuild
Projects="$(MSBuildThisFileDirectory)\mono-runtimes.mdproj"
Properties="_ForceXbuildToNotCacheTargets=$(_Now)"
Targets="ForceBuild"
/>
</Target>
<Target Name="_CleanRuntimes"
AfterTargets="Clean">
<RemoveDir Directories="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)');@(_MonoCrossRuntime->'$(IntermediateOutputPath)\%(Identity)');$(_LlvmBuildDir32);$(_LlvmBuildDir64);$(_LlvmBuildDirWin32);$(_LlvmBuildDirWin64)" />
<Delete Files="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity).config.cache');$(_CrossOutputPrefix)*.config.cache;$(_CrossOutputDirTop)\llvm*.config.cache" />
</Target>
</Project>