Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric St. John <ericstj@microsoft.com>2017-04-11 01:07:57 +0300
committerEric St. John <ericstj@microsoft.com>2017-04-12 23:42:48 +0300
commit3ec0e74e4f4dabcb30852147ee6e1fc1af9b4346 (patch)
tree3305e040ab9277264bad1900dc3b6a57d076715a /Tools-Override
parent83e91cb0284293e8954dbe83c080f537d6c79eac (diff)
Make BinPlaceProps understand ItemName, SaveItemName
ItemName was added previously to allow binplacing something other than the default project output. Make BinPlaceProps understand this. I also have a need to specify different item names for ref vs runtime so I've added "SaveItemName" metadata to specify this. By default I use LibFile for PackageFileRuntimePath and RefFile for PackageFileRefPath. A BinPlaceConfiguration can specify a different SaveItemName to override.
Diffstat (limited to 'Tools-Override')
-rw-r--r--Tools-Override/FrameworkTargeting.targets25
1 files changed, 18 insertions, 7 deletions
diff --git a/Tools-Override/FrameworkTargeting.targets b/Tools-Override/FrameworkTargeting.targets
index dd14c2dbd0..bdbe493f0d 100644
--- a/Tools-Override/FrameworkTargeting.targets
+++ b/Tools-Override/FrameworkTargeting.targets
@@ -253,15 +253,22 @@
<UsingTask TaskName="SaveItems" AssemblyFile="$(CoreFxToolsTaskDir)CoreFx.Tools.dll"/>
<Target Name="BinPlaceProps"
Condition="'@(PackageFileDir)' != ''"
- DependsOnTargets="GetBinPlaceItems" >
+ DependsOnTargets="GetBinPlaceItems"
+ Inputs="@(PackageFileDir);%(PackageFileDir.ItemName)"
+ Outputs="unused" >
<PropertyGroup>
<_propsFilename>$(TargetName)</_propsFilename>
<_propsFilename Condition="'$(_propsFilename)' == ''">$(MSBuildProjectName)</_propsFilename>
<_projectDirLength>$(ProjectDir.Length)</_projectDirLength>
</PropertyGroup>
-
+
+ <PropertyGroup>
+ <_BinPlaceItemName>%(PackageFileDir.ItemName)</_BinPlaceItemName>
+ <_BinPlaceItemName Condition="'$(_BinPlaceItemName)' == ''">BinPlaceItem</_BinPlaceItemName>
+ </PropertyGroup>
+
<ItemGroup>
- <_itemsToSave Include="@(BinPlaceItem)">
+ <_itemsToSave Include="@($(_BinPlaceItemName))">
<!-- intentionally empty: to be set by pkgproj -->
<TargetPath></TargetPath>
</_itemsToSave>
@@ -276,9 +283,9 @@
<Message Importance="low" Text="PackageFileDir: @(PackageFileDir)" />
- <SaveItems ItemName="FileToPackage"
+ <SaveItems ItemName="%(PackageFileDir.SaveItemName)"
Items="@(_itemsToSave)"
- Files="@(PackageFileDir->'%(Identity)\$(_propsFilename).props')" />
+ Files="%(PackageFileDir.Identity)\$(_propsFilename).props" />
</Target>
<Target Name="GetBinPlaceItems" DependsOnTargets="GetCopyToOutputDirectoryItems">
@@ -307,8 +314,12 @@
<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)" />
+ <PackageFileDir Condition="'$(BinPlaceRuntime)' == 'true'" Include="@(_currentBinPlaceConfigurations->'%(PackageFileRuntimePath)')">
+ <SaveItemName Condition="'%(_currentBinPlaceConfigurations.SaveItemName)' == ''">LibFile</SaveItemName>
+ </PackageFileDir>
+ <PackageFileDir Condition="'$(BinPlaceRef)' == 'true'" Include="@(_currentBinPlaceConfigurations->'%(PackageFileRefPath)')">
+ <SaveItemName Condition="'%(_currentBinPlaceConfigurations.SaveItemName)' == ''">RefFile</SaveItemName>
+ </PackageFileDir>
<!-- permit BinplaceConfigurations to define SetProperties metadata,
set those properties when BinplaceConfiguration is active -->