Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions build-tools/mono-runtimes/mono-runtimes.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
</PropertyGroup>
<ItemGroup>
<MonoDocCopyItem Include="monodoc.dll" />
<MonoDocCopyItem Include="monodoc.dll.mdb" />
<MonoDocCopyItemOptional Include="monodoc.pdb" />
<MonoDocCopyItemOptional Include="monodoc.dll.mdb" />
<MonoDocCopyItem Include="monodoc.dll.config" />
</ItemGroup>
<ItemGroup>
Expand All @@ -25,13 +26,6 @@
<_MonoProfileDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid</_MonoProfileDir>
<_MonoOutputDir>$(MonoSourceFullPath)\mcs\class\lib\net_4_x</_MonoOutputDir>
</PropertyGroup>
<ItemGroup>
<_MonoDocCopyItems Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')" />
</ItemGroup>
<ItemGroup>
<_MonoDocInstalledItems Include="@(MonoDocCopyItem->'$(_MandroidDir)\%(Identity)')" />
<_MonoDocInstalledItems Include="$(_MandroidDir)\mdoc.exe" />
</ItemGroup>
<PropertyGroup>
<ForceBuildDependsOn>
_BuildLlvm;
Expand Down Expand Up @@ -146,7 +140,7 @@
/>
</Target>
<Target Name="_ConfigureRuntimes"
DependsOnTargets="_BuildLlvm"
DependsOnTargets="_BuildLlvm;_Autogen"
Inputs="$(MonoSourceFullPath)\configure"
Outputs="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)\Makefile">
<MakeDir Directories="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)" />
Expand Down Expand Up @@ -230,7 +224,7 @@
</ItemGroup>
</Target>
<Target Name="_BuildRuntimes"
DependsOnTargets="_GetRuntimesOutputItems"
DependsOnTargets="_GetRuntimesOutputItems;_ConfigureRuntimes"
Inputs="@(_RuntimeBuildStamp)"
Outputs="@(_RuntimeSource);@(_ProfilerSource);@(_MonoPosixHelperSource);@(_BclProfileItems);@(_MonoBtlsSource)">
<Exec
Expand Down Expand Up @@ -323,9 +317,27 @@
/>
<Touch Files="@(_InstallMonoPosixHelperOutput);@(_InstallUnstrippedMonoPosixHelperOutput)" />
</Target>
<Target Name="_GetMonodocItems" DependsOnTargets="_BuildRuntimes">
<ItemGroup>
<_MonoDocCopyItems Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')" />
<_MonoDocCopyItems
Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') "
Include="@(MonoDocCopyItemOptional->'$(_MonoOutputDir)\%(Identity)')"
/>
</ItemGroup>
<ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can collapse these into one ItemGroup. there is not need to separate them. unless @jonpryor said to :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're not the same, one contains "mdoc.exe" and the other doesn't

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can mix different items within an ItemGroup so

<ItemGroup>
    <Foo Include="Somefile.dll" />
    <Bar Include="Someotherbarfile.dll" />
</ItemGroup>

MSbuild and xbuild will evaluate each "item" separately. But its sometimes useful to put items together in logical groups just to make it easier to maintain. This is probably one of those cases :)

<_MonoDocInstalledItems Include="@(MonoDocCopyItem->'$(_MandroidDir)\%(Identity)')" />
<_MonoDocInstalledItems
Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') "
Include="@(MonoDocCopyItemOptional->'$(_MandroidDir)\%(Identity)')"
/>
<_MonoDocInstalledItems Include="$(_MandroidDir)\mdoc.exe" />
</ItemGroup>
</Target>
<Target Name="_InstallMonoDoc"
Inputs="@(_MonoDocCopyItems);$(_MonoOutputDir)\mdoc.exe"
Outputs="@(_MonoDocInstalledItems)">
Outputs="@(_MonoDocInstalledItems)"
DependsOnTargets="_GetMonodocItems">
<MakeDir Directories="$(_MandroidDir)" />
<Copy
SourceFiles="@(_MonoDocCopyItems)"
Expand Down Expand Up @@ -474,7 +486,7 @@
/>
</Target>
<Target Name="GetMonoBundleItems"
DependsOnTargets="_GetRuntimesOutputItems;_PrepareLlvmItems">
DependsOnTargets="_GetRuntimesOutputItems;_GetMonodocItems;_PrepareLlvmItems">
<ItemGroup>
<BundleItem Include="@(_BclInstalledItem)" />
<BundleItem Include="@(_MonoDocInstalledItems)" />
Expand Down
2 changes: 1 addition & 1 deletion external/mono
Submodule mono updated 2919 files