You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
129
external/corefx/dir.targets
vendored
129
external/corefx/dir.targets
vendored
@@ -8,55 +8,95 @@
|
||||
Text="The tools directory [$(ToolsDir)] does not exist. Please run init-tools.cmd in your enlistment to ensure the tools are installed before attempting to build an individual project." />
|
||||
</Target>
|
||||
|
||||
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
|
||||
<Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
|
||||
<Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
|
||||
<Target Name="Test" />
|
||||
<Import Project="buildvertical.targets" />
|
||||
|
||||
<!-- build vertical requires the FindBestConfiguration task which is currently in CoreFx.Tools.dll -->
|
||||
<Import Project="buildvertical.targets" Condition="Exists('$(CoreFxToolsTaskDir)CoreFx.Tools.dll')" />
|
||||
<!-- Corefx-specific binplacing properties -->
|
||||
<PropertyGroup>
|
||||
<IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)'=='' AND '$(IsReferenceAssembly)' != 'true' AND '$(BinPlaceRef)' != 'true' AND '$(IsTestProject)' != 'true'">true</IsRuntimeAssembly>
|
||||
<!-- Try to determine if this is a simple library without a ref project.
|
||||
https://github.com/dotnet/corefx/issues/14291 is tracking cleaning this up -->
|
||||
<IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and '$(IsRuntimeAssembly)' == 'true' and Exists('$(SourceDir)/$(MSBuildProjectName)') and !Exists('$(SourceDir)/$(MSBuildProjectName)/ref') and !$(MSBuildProjectName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
|
||||
<IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == ''">$(IsNETCoreApp)</IsNETCoreAppRef>
|
||||
<IsUAPRef Condition="'$(IsUAPRef)' == ''">$(IsUAP)</IsUAPRef>
|
||||
<IsNetFxNETStandardRef Condition="'$(IsNetFxNETStandardRef)' == ''">$(IsNetFxNETStandard)</IsNetFxNETStandardRef>
|
||||
|
||||
<Target Name="UndefineTestTFM"
|
||||
BeforeTargets="AssignProjectConfiguration">
|
||||
<ItemGroup>
|
||||
<!--
|
||||
Always undefine TestTFM and FilterToTestTFM for all project reference as not needed for compilation and
|
||||
avoid bin clash tool to fail
|
||||
-->
|
||||
<ProjectReference>
|
||||
<UndefineProperties>%(ProjectReference.UndefineProperties);TestTFM;FilterToTestTFM</UndefineProperties>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
<BinPlaceRef Condition="'$(BinPlaceRef)' == '' And ('$(IsReferenceAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
|
||||
<BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' And ('$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'@(BinPlaceConfiguration)' == ''">
|
||||
<!-- binplace to directories for the target vertical -->
|
||||
<BinPlaceConfiguration Include="$(_bc_TargetGroup)-$(_bc_OSGroup)">
|
||||
<RefPath>$(BuildConfigurationRefPath)</RefPath>
|
||||
<RuntimePath>$(RuntimePath)</RuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
<!-- binplace to directories for packages -->
|
||||
<BinPlaceConfiguration Condition="'$(IsNETCoreApp)' == 'true' AND '$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
|
||||
<PackageFileRefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</PackageFileRefPath>
|
||||
<PackageFileRuntimePath>$(NETCoreAppPackageRuntimePath)</PackageFileRuntimePath>
|
||||
<RuntimePath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true'">$(NETCoreAppPackageRuntimePath)\..\runtime</RuntimePath>
|
||||
<!-- enable trimming for any runtime project that's part of the shared framework and hasn't already set ILLinkTrimAssembly -->
|
||||
<SetProperties Condition="'$(BinPlaceRuntime)' == 'true' AND '$(ILLinkTrimAssembly)' == ''">ILLinkTrimAssembly=true</SetProperties>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(IsUAPRef)'=='true' AND ('$(BuildingUAPVertical)' == 'true' OR '$(BuildingUAPAOTVertical)' == 'true')" Include="uap-$(_bc_OSGroup)">
|
||||
<PackageFileRefPath>$(UAPPackageRefPath)</PackageFileRefPath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPVertical)' == 'true'" Include="uap-$(_bc_OSGroup)">
|
||||
<PackageFileRuntimePath>$(UAPPackageRuntimePath)</PackageFileRuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPAOTVertical)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
|
||||
<PackageFileRuntimePath>$(UAPAOTPackageRuntimePath)</PackageFileRuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="('$(IsNetFxNETStandard)' == 'true' OR '$(IsNetFxNETStandardRef)' == 'true') AND '$(BuildingNETFxVertical)' == 'true'"
|
||||
Include="netfx-$(_bc_OSGroup);net462-$(_bc_OSGroup);net47-$(_bc_OSGroup)">
|
||||
<PackageFileRefPath Condition="'$(IsNetFxNETStandardRef)'=='true'">$(NetFxPackageRefPath)</PackageFileRefPath>
|
||||
<PackageFileRuntimePath Condition="'$(IsNetFxNETStandard)'=='true'">$(NetFxPackageRuntimePath)</PackageFileRuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
|
||||
<!-- Setup the shared framework directory for testing -->
|
||||
<BinPlaceConfiguration Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
|
||||
<RuntimePath>$(NETCoreAppTestSharedFrameworkPath)</RuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
<!-- Setup the ILCInputFolder directory for testing uapaot -->
|
||||
<BinPlaceConfiguration Condition="'$(BinPlaceILCInputFolder)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
|
||||
<RuntimePath>$(ILCFXInputFolder)</RuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
<!-- And the UAP folder for the F5 (CoreCLR UAP-debugging) scenario -->
|
||||
<BinPlaceConfiguration Condition="'$(BinPlaceUAPFramework)' == 'true'" Include="uap-$(_bc_OSGroup)">
|
||||
<RuntimePath>$(UAPTestSharedFrameworkPath)</RuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(BinPlaceNETFXRuntime)' == 'true'" Include="netfx-$(_bc_OSGroup)">
|
||||
<RuntimePath>$(TestHostRootPath)</RuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
|
||||
<!-- binplace targeting packs which may be different from BuildConfiguration -->
|
||||
<BinPlaceConfiguration Include="netstandard">
|
||||
<RefPath>$(RefRootPath)netstandard/</RefPath>
|
||||
</BinPlaceConfiguration>
|
||||
<!-- for BuildAllConfigurations make sure all refpaths are created. -->
|
||||
<_TargetGroupsWithIsAot Condition="'$(BuildAllConfigurations)' == 'true'" Include="@(TargetGroups)">
|
||||
<IsAot>$([System.String]::new('%(Identity)').Contains('aot'))</IsAot>
|
||||
</_TargetGroupsWithIsAot>
|
||||
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
|
||||
Include="@(_TargetGroupsWithIsAot->WithMetadataValue('IsAot', 'false'))">
|
||||
<RefPath>$(RefRootPath)%(Identity)/</RefPath>
|
||||
</BinPlaceConfiguration>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(ToolsDir)/Build.Common.targets" Condition="Exists('$(ToolsDir)/Build.Common.targets')" />
|
||||
|
||||
<!-- permit a wrapping build system to contribute targets to this build -->
|
||||
<Import Condition="Exists('$(MSBuildThisFileDirectory)..\open.targets')" Project="$(MSBuildThisFileDirectory)..\open.targets" />
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)binplace.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)referenceFromRuntime.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
|
||||
the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
|
||||
<_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
|
||||
<_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
|
||||
<!-- We do not want to target a portable profile.
|
||||
TODO: Make this the default in buildtools so this is not necessary. -->
|
||||
<TargetFrameworkProfile></TargetFrameworkProfile>
|
||||
<!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) -->
|
||||
<PortableNuGetMode>true</PortableNuGetMode>
|
||||
<!-- tests should not set this. A value of netstandard* triggers validation which is irrelevant for tests. Remove once ValidatePackageTargetFramework target is removed -->
|
||||
<PackageTargetFramework Condition="'$(IsTestProject)' == 'true'"></PackageTargetFramework>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildThisFileDirectory)illink.targets" />
|
||||
|
||||
<ItemGroup Condition="'$(NuGetTargetMoniker)'=='.NETStandard,Version=v1.7'">
|
||||
<!-- Temporarily suppress the message until we get a nuget version that knows about the mapping between netstandard1.7 and uap10.1 -->
|
||||
<SuppressPackageTargetFrameworkCompatibility Include="uap10.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ProducesPackageId"
|
||||
<Target Name="ProducesPackageId"
|
||||
Returns="@(PackageIds)">
|
||||
<ItemGroup>
|
||||
<PackageIds Include="$(Id)" />
|
||||
@@ -70,4 +110,25 @@
|
||||
<Message Importance="High" Condition="'$(ConfigurationErrorMsg)' != ''" Text="$(MSBuildProjectFullPath) ConfigurationErrorMessage: $(ConfigurationErrorMsg)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateReferenceSource">
|
||||
<PropertyGroup>
|
||||
<_GenApiExePath>$(ToolsDir)GenApi.exe</_GenApiExePath>
|
||||
<_RefSourceFileOutputPath>$(MSBuildProjectDirectory)/../ref/$(AssemblyName).cs</_RefSourceFileOutputPath>
|
||||
<_ExcludeAPIList>$(MSBuildThisFileDirectory)tools-local/DefaultGenApiDocIds.txt</_ExcludeAPIList>
|
||||
<_LicenseHeaderTxtPath>$(MSBuildThisFileDirectory)tools-local/LicenseHeader.txt</_LicenseHeaderTxtPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<_GenAPICmd>$(DotnetToolCommand) $(_GenApiExePath)</_GenAPICmd>
|
||||
<_GenAPICmd>$(_GenAPICmd) -assembly:$(TargetPath)</_GenAPICmd>
|
||||
<_GenAPICmd>$(_GenAPICmd) -libPath:$(RefPath)</_GenAPICmd>
|
||||
<_GenAPICmd>$(_GenAPICmd) -out:$(_RefSourceFileOutputPath)</_GenAPICmd>
|
||||
<_GenAPICmd>$(_GenAPICmd) -excludeAttributesList:$(_ExcludeAPIList)</_GenAPICmd>
|
||||
<_GenAPICmd>$(_GenAPICmd) -headerFile:$(_LicenseHeaderTxtPath)</_GenAPICmd>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="$(_GenAPICmd)" />
|
||||
<Message Text="Generated reference assembly source code: $(_RefSourceFileOutputPath)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user