You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
163
external/corefx/binplace.targets
vendored
163
external/corefx/binplace.targets
vendored
@@ -2,66 +2,157 @@
|
||||
<Project ToolsVersion="14.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)'=='' AND '$(IsReferenceAssembly)' != 'true' AND '$(IsTestProject)' != 'true'">true</IsRuntimeAssembly>
|
||||
<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)/$(AssemblyName)') and !Exists('$(SourceDir)/$(AssemblyName)/ref') and !$(AssemblyName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
|
||||
<IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == ''">$(IsNETCoreApp)</IsNETCoreAppRef>
|
||||
<BinPlaceStuffDependsOn Condition="'$(IsReferenceAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true'">$(BinPlaceStuffDependsOn);BinPlaceReferenceAssembly</BinPlaceStuffDependsOn>
|
||||
<BinPlaceStuffDependsOn Condition="'$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true'">$(BinPlaceStuffDependsOn);BinPlaceRuntimeAssembly</BinPlaceStuffDependsOn>
|
||||
<IsUAPRef Condition="'$(IsUAPRef)' == ''">$(IsUAP)</IsUAPRef>
|
||||
|
||||
<BuildingDesktopFacade Condition="'$(IsDesktopFacade)' == 'true' And ('$(TargetGroup)' == 'netfx' Or $(TargetGroup.StartsWith('net4')))" >true</BuildingDesktopFacade>
|
||||
|
||||
<!-- if building desktop facade, we don't bin place the refs -->
|
||||
<BinPlaceRef Condition="'$(BinPlaceRef)' == '' And '$(BuildingDesktopFacade)' != 'true' And ('$(IsReferenceAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
|
||||
<BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' And ('$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>
|
||||
|
||||
<!-- if building desktop facade and bin placing the runtime, then we need to bin place the refs too -->
|
||||
<BinPlaceRef Condition="'$(BuildingDesktopFacade)' == 'true' And '$(BinPlaceRuntime)' == 'true'">true</BinPlaceRef>
|
||||
|
||||
<BinPlaceUseHardlinksIfPossible Condition="'$(BinPlaceUseHardlinksIfPossible)' == ''">true</BinPlaceUseHardlinksIfPossible>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<BinplaceConfiguration Include="$(BuildConfiguration)">
|
||||
|
||||
<ItemGroup Condition="'@(BinPlaceConfiguration)' == ''">
|
||||
<!-- binplace to directories for the target vertical -->
|
||||
<BinPlaceConfiguration Include="$(BuildConfiguration)">
|
||||
<RefPath>$(BuildConfigurationRefPath)</RefPath>
|
||||
<RuntimePath>$(RuntimePath)</RuntimePath>
|
||||
</BinplaceConfiguration>
|
||||
<BinplaceConfiguration Condition="'$(IsNETCoreApp)' == 'true'" Include="netcoreapp-$(OSGroup)">
|
||||
<RefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</RefPath>
|
||||
<RuntimePath>$(NETCoreAppPackageRuntimePath)</RuntimePath>
|
||||
</BinplaceConfiguration>
|
||||
<BinplaceConfiguration Include="netstandard-$(OSGroup)">
|
||||
<RefPath>$(RefRootPath)netstandard</RefPath>
|
||||
</BinplaceConfiguration>
|
||||
</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>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPVertical)' == 'true'" Include="uap-$(_bc_OSGroup)">
|
||||
<PackageFileRefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</PackageFileRefPath>
|
||||
<PackageFileRuntimePath>$(UAPPackageRuntimePath)</PackageFileRuntimePath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPAOTVertical)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
|
||||
<PackageFileRefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</PackageFileRefPath>
|
||||
<PackageFileRuntimePath>$(UAPAOTPackageRuntimePath)</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>
|
||||
<!-- binplace targeting packs which may be different from BuildConfiguration -->
|
||||
<BinPlaceConfiguration Include="netstandard">
|
||||
<RefPath>$(RefRootPath)netstandard/</RefPath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
|
||||
Include="netcoreapp">
|
||||
<RefPath>$(RefRootPath)netcoreapp/</RefPath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
|
||||
Include="uap">
|
||||
<RefPath>$(RefRootPath)uap/</RefPath>
|
||||
</BinPlaceConfiguration>
|
||||
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
|
||||
Include="netfx">
|
||||
<RefPath>$(RefRootPath)netfx/</RefPath>
|
||||
</BinPlaceConfiguration>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BinPlaceStuff" DependsOnTargets="$(BinPlaceStuffDependsOn)" AfterTargets="CopyFilesToOutputDirectory">
|
||||
<Message Importance="low" Text="IsRuntimeAssembly: $(IsRuntimeAssembly)" />
|
||||
<Message Importance="low" Text="IsReferenceAssembly: $(IsReferenceAssembly)" />
|
||||
<Message Importance="low" Text="IsRuntimeAndReferenceAssembly: $(IsRuntimeAndReferenceAssembly)" />
|
||||
</Target>
|
||||
<Target Name="BinPlace"
|
||||
DependsOnTargets="GetBinPlaceDirs;BinPlaceFiles;BinPlaceProps"
|
||||
AfterTargets="CopyFilesToOutputDirectory"
|
||||
Condition="'$(BinPlaceRef)' == 'true' OR '$(BinPlaceRuntime)' == 'true'" />
|
||||
|
||||
<Target Name="BinPlaceReferenceAssembly" DependsOnTargets="GetBinplaceDirs">
|
||||
<Message Importance="low" Text="TargetingPackDir: @(TargetingPackDir)" />
|
||||
<Copy Condition="'@(TargetingPackDir)' != ''" SourceFiles="$(TargetPath)" DestinationFolder="%(TargetingPackDir.Identity)" >
|
||||
<Target Name="BinPlaceFiles"
|
||||
Condition="'@(BinPlaceDir)' != ''"
|
||||
DependsOnTargets="GetBinPlaceItems" >
|
||||
|
||||
<Message Importance="low" Text="BinPlaceDir: @(BinPlaceDir)" />
|
||||
|
||||
<Copy SourceFiles="@(BinPlaceItem)"
|
||||
DestinationFolder="%(BinPlaceDir.Identity)"
|
||||
SkipUnchangedFiles="true"
|
||||
OverwriteReadOnlyFiles="true"
|
||||
Retries="$(CopyRetryCount)"
|
||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
|
||||
UseHardlinksIfPossible="$(BinPlaceUseHardlinksIfPossible)">
|
||||
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
|
||||
</Copy>
|
||||
</Target>
|
||||
|
||||
<Target Name="BinPlaceRuntimeAssembly" DependsOnTargets="GetBinplaceDirs">
|
||||
<Copy Condition="'@(RuntimeDir)' != ''" SourceFiles="$(TargetPath)" DestinationFolder="%(RuntimeDir.Identity)">
|
||||
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
|
||||
</Copy>
|
||||
<Copy Condition="'@(RuntimeDir)' != '' And Exists($(TargetPath.Replace('.dll', '.pdb')))" SourceFiles="$(TargetPath.Replace('.dll', '.pdb'))" DestinationFolder="%(RuntimeDir.Identity)">
|
||||
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
|
||||
</Copy>
|
||||
<UsingTask TaskName="SaveItems" AssemblyFile="$(CoreFxToolsTaskDir)CoreFx.Tools.dll"/>
|
||||
<Target Name="BinPlaceProps"
|
||||
Condition="'@(PackageFileDir)' != ''"
|
||||
DependsOnTargets="GetBinPlaceItems" >
|
||||
<PropertyGroup>
|
||||
<_propsFilename>$(TargetName)</_propsFilename>
|
||||
<_propsFilename Condition="'$(_propsFilename)' == ''">$(MSBuildProjectName)</_propsFilename>
|
||||
<_projectDirLength>$(ProjectDir.Length)</_projectDirLength>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_itemsToSave Include="@(BinPlaceItem)">
|
||||
<!-- intentionally empty: to be set by pkgproj -->
|
||||
<TargetPath></TargetPath>
|
||||
</_itemsToSave>
|
||||
|
||||
<!-- Include source files. -->
|
||||
<_itemsToSave Condition="'@(Compile)' != ''" Include="@(Compile->'%(FullPath)')">
|
||||
<TargetPath>src</TargetPath>
|
||||
<TargetPath Condition="$([System.String]::Copy('%(FullPath)').StartsWith('$(ProjectDir)'))">src/$([System.String]::Copy('%(FullPath)').Substring($(_projectDirLength)).Replace('\', '/'))</TargetPath>
|
||||
<IsSourceCodeFile>true</IsSourceCodeFile>
|
||||
</_itemsToSave>
|
||||
</ItemGroup>
|
||||
|
||||
<Message Importance="low" Text="PackageFileDir: @(PackageFileDir)" />
|
||||
|
||||
<SaveItems ItemName="FileToPackage"
|
||||
Items="@(_itemsToSave)"
|
||||
Files="@(PackageFileDir->'%(Identity)\$(_propsFilename).props')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GetBinplaceDirs" DependsOnTargets="GetBuildConfigurations">
|
||||
<Target Name="GetBinPlaceItems" DependsOnTargets="GetCopyToOutputDirectoryItems">
|
||||
<ItemGroup>
|
||||
<BinPlaceItem Condition="Exists('$(TargetPath)')" Include="$(TargetPath)" />
|
||||
<BinPlaceItem Condition="Exists('$(TargetDir)$(TargetName).pdb')" Include="$(TargetDir)$(TargetName).pdb" />
|
||||
<BinPlaceItem Condition="'$(BinPlaceReferenceCopyLocalPaths)' != 'false'" Include="@(ReferenceCopyLocalPaths)" />
|
||||
<BinPlaceItem Condition="'$(BinPlaceCopyToOutputDirectoryItems)' != 'false'" Include="@(AllItemsFullPathWithTargetPath)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GetBinPlaceDirs" DependsOnTargets="GetBuildConfigurations">
|
||||
<!-- find which, if any, build configuration of this project is best
|
||||
for each binplace configuration -->
|
||||
<FindBestConfigurations Properties="@(Property)"
|
||||
PropertyValues="@(PropertyValue)"
|
||||
SupportedConfigurations="$(_AllBuildConfigurations)"
|
||||
Configurations="@(BinplaceConfiguration)">
|
||||
Configurations="@(BinPlaceConfiguration)">
|
||||
<Output TaskParameter="BestConfigurations" ItemName="_bestBinlaceConfigurations" />
|
||||
</FindBestConfigurations>
|
||||
|
||||
<ItemGroup>
|
||||
<_currentBinplaceConfigurations Include="@(_bestBinlaceConfigurations)" Condition="'%(Identity)' == '$(Configuration)' OR '%(Identity)-$(ConfigurationGroup)' == '$(Configuration)'" />
|
||||
|
||||
<RuntimeDir Include="@(_currentBinplaceConfigurations->'%(RuntimePath)')"/>
|
||||
<TargetingPackDir Include="@(_currentBinplaceConfigurations->'%(RefPath)')"/>
|
||||
<ItemGroup>
|
||||
<_currentBinPlaceConfigurations Include="@(_bestBinlaceConfigurations)" Condition="'%(Identity)' == '$(Configuration)' OR '%(Identity)-$(ConfigurationGroup)' == '$(Configuration)'" />
|
||||
|
||||
<BinPlaceDir Condition="'$(BinPlaceRuntime)' == 'true'" Include="%(_currentBinPlaceConfigurations.RuntimePath)" />
|
||||
<BinPlaceDir Condition="'$(BinPlaceRef)' == 'true'" Include="%(_currentBinPlaceConfigurations.RefPath)" />
|
||||
|
||||
<PackageFileDir Condition="'$(BinPlaceRuntime)' == 'true'" Include="%(_currentBinPlaceConfigurations.PackageFileRuntimePath)" />
|
||||
<PackageFileDir Condition="'$(BinPlaceRef)' == 'true'" Include="%(_currentBinPlaceConfigurations.PackageFileRefPath)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user