linux-packaging-mono/external/corert/dir.traversal.targets
Xamarin Public Jenkins (auto-signing) 6bdd276d05 Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
2017-04-10 11:41:01 +00:00

205 lines
9.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="FilterProjects">
<PropertyGroup>
<FilterToOSGroup Condition="'$(FilterToOSGroup)'=='' and '$(OSGroup)'!='' and '$(OSGroup)'!='AnyOS'">$(OSGroup)</FilterToOSGroup>
</PropertyGroup>
<ItemGroup>
<!-- list each append as a seperate item to force re-evaluation of AdditionalProperties metadata -->
<Project>
<AdditionalProperties Condition="'%(Project.TargetGroup)'!=''">TargetGroup=%(Project.TargetGroup);%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
<Project>
<FilterToTargetGroup Condition="'$(FilterToTargetGroup)'!=''">$(FilterToTargetGroup)</FilterToTargetGroup>
</Project>
<Project>
<FilterToOSGroup Condition="'$(FilterToOSGroup)'!=''">$(FilterToOSGroup)</FilterToOSGroup>
</Project>
<Project>
<AdditionalProperties Condition="'%(Project.OSGroup)'!=''">OSGroup=%(Project.OSGroup);%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
<Project>
<AdditionalProperties Condition="'%(Project.Platform)'!=''">Platform=%(Project.Platform);%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
<Project>
<AdditionalProperties Condition="'%(Project.FilterToOSGroup)'!=''">FilterToOSGroup=%(Project.FilterToOSGroup);%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
<Project>
<AdditionalProperties Condition="'%(Project.FilterToTargetGroup)'!=''">FilterToTargetGroup=%(Project.FilterToTargetGroup);%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
<Project>
<AdditionalProperties Condition="'%(Project.InputOSGroup)' != ''">InputOSGroup=%(Project.InputOSGroup);%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
<Project>
<AdditionalProperties Condition="'%(Project.BuildAllOSGroups)' != ''">BuildAllOSGroups=%(Project.BuildAllOSGroups);%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
<!-- If a project isn't setting the OSGroup via metadata then undefine it so that the globally set OSGroup doesn't override empty OSGroup -->
<Project>
<UndefineProperties Condition="'%(Project.OSGroup)'==''">%(Project.UndefineProperties);OSGroup</UndefineProperties>
</Project>
<Project>
<UndefineProperties Condition="'%(Project.Extension)'!='.builds' and '%(Project.Extension)'!='.proj'">%(Project.UndefineProperties);TestTFMs;FilterToOSGroup;FilterToTestTFM;DefaultBuildAllTarget;SerializeProjects;BuildAllOSGroups</UndefineProperties>
</Project>
</ItemGroup>
<!-- If we have enabled code coverage and set the projects to be serialized we need to pass that property down to the childe projects -->
<ItemGroup Condition="'$(CodeCoverageEnabled)'=='true' and '$(SerializeProjects)'=='true'">
<Project>
<AdditionalProperties>SerializeProjects=true;%(Project.AdditionalProperties)</AdditionalProperties>
</Project>
</ItemGroup>
<PropertyGroup>
<OSGroupList>AnyOS;$(FilterToOSGroup);</OSGroupList>
<OSGroupList Condition="'$(FilterToOSGroup)'=='OSX'">$(OSGroupList);Unix;</OSGroupList>
<OSGroupList Condition="'$(FilterToOSGroup)'=='Linux'">$(OSGroupList);Unix;</OSGroupList>
<OSGroupList Condition="'$(FilterToOSGroup)'=='FreeBSD'">$(OSGroupList);Unix;</OSGroupList>
<OSGroupList Condition="'$(FilterToOSGroup)'=='NetBSD'">$(OSGroupList);Unix;</OSGroupList>
</PropertyGroup>
<ItemGroup Condition="'$(FilterToOSGroup)'!='' and '$(BuildAllOSGroups)' != 'true'">
<ProjectsToBuild Include="@(Project)" Condition="$(OSGroupList.Contains('%(Project.OSGroup);'))" />
<Project Remove="@(Project)" />
<Project Include="@(ProjectsToBuild)" />
</ItemGroup>
</Target>
<Target Name="DumpTargets" DependsOnTargets="FilterProjects">
<MSBuild Targets="$(DefaultBuildAllTarget)"
Projects="@(Project)"
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true"
ContinueOnError="ErrorAndContinue" />
</Target>
<Target Name="ProducesPackageId"
Returns="@(PackageIds)"
DependsOnTargets="FilterProjects">
<MSBuild Targets="ProducesPackageId"
Projects="@(Project)"
BuildInParallel="true"
ContinueOnError="ErrorAndContinue">
<Output TaskParameter="TargetOutputs"
ItemName="PackageIds" />
</MSBuild>
<ItemGroup>
<PackageIds Include="@(PackageIds)" />
</ItemGroup>
</Target>
<Target Name="ProducesTarget" DependsOnTargets="FilterProjects">
<MSBuild Targets="ProducesPackageId"
Projects="@(Project)"
BuildInParallel="true"
ContinueOnError="ErrorAndContinue">
<Output TaskParameter="TargetOutputs"
ItemName="PackageIds" />
</MSBuild>
<Message Text="%(PackageIds.Identity)" Importance="High" />
</Target>
<Target Name="BuildAllProjects" DependsOnTargets="FilterProjects">
<PropertyGroup>
<DefaultBuildAllTarget Condition="'$(DefaultBuildAllTarget)'==''">$(MSBuildProjectDefaultTargets)</DefaultBuildAllTarget>
</PropertyGroup>
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
however since the project names are unique it will essentially force each to run in its own batch -->
<MSBuild Targets="$(DefaultBuildAllTarget)"
Projects="@(Project)"
Condition="'$(SerializeProjects)'=='true' AND '%(Identity)' != ''"
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true"
ContinueOnError="ErrorAndContinue" />
<MSBuild Targets="$(DefaultBuildAllTarget)"
Projects="@(Project)"
Condition="'$(SerializeProjects)'!='true'"
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true"
BuildInParallel="true"
ContinueOnError="ErrorAndContinue" />
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
</Target>
<Target Name="CleanAllProjects">
<PropertyGroup>
<DefaultCleanAllTarget Condition="'$(DefaultCleanAllTarget)'==''">Clean</DefaultCleanAllTarget>
</PropertyGroup>
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
however since the project names are unique it will essentially force each to run in its own batch -->
<MSBuild Targets="$(DefaultCleanAllTarget)"
Projects="@(Project)"
Condition="'$(SerializeProjects)'=='true' AND '%(Identity)' != ''"
Properties="CleanAllProjects=true"
ContinueOnError="ErrorAndContinue" />
<MSBuild Targets="$(DefaultCleanAllTarget)"
Projects="@(Project)"
Condition="'$(SerializeProjects)'!='true'"
Properties="CleanAllProjects=true"
BuildInParallel="true"
ContinueOnError="ErrorAndContinue" />
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
</Target>
<Target Name="RestoreAllProjectPackages">
<Message Importance="High" Text="Restoring project packages..." />
<PropertyGroup>
<DefaultRestoreAllPackagesTarget Condition="'$(DefaultRestoreAllPackagesTarget)'==''">RestorePackages</DefaultRestoreAllPackagesTarget>
</PropertyGroup>
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
however since the project names are unique it will essentially force each to run in its own batch -->
<MSBuild Targets="$(DefaultRestoreAllPackagesTarget)"
Projects="@(Project)"
Condition="'$(SerializeProjects)'=='true' AND '%(Identity)' != ''"
Properties="RestoreAllPackages=true"
ContinueOnError="ErrorAndContinue" />
<MSBuild Targets="$(DefaultRestoreAllPackagesTarget)"
Projects="@(Project)"
Condition="'$(SerializeProjects)'!='true'"
Properties="RestoreAllPackages=true"
BuildInParallel="true"
ContinueOnError="ErrorAndContinue" />
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
</Target>
<PropertyGroup>
<TraversalBuildDependsOn>
BuildAllProjects;
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
<TraversalCleanDependsOn>
CleanAllProjects;
$(TraversalCleanDependsOn);
</TraversalCleanDependsOn>
<TraversalRestorePackagesDependsOn>
RestoreAllProjectPackages;
$(TraversalRestorePackagesDependsOn)
</TraversalRestorePackagesDependsOn>
</PropertyGroup>
<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" />
<Target Name="Clean" DependsOnTargets="$(TraversalCleanDependsOn)" />
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Target Name="RestorePackages" DependsOnTargets="$(TraversalRestorePackagesDependsOn)" />
</Project>