forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
94 lines (72 loc) · 3.61 KB
/
build.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<Project DefaultTargets="Build">
<Import Project="Directory.Build.props" />
<PropertyGroup>
<BuildNative Condition="'$(BuildNative)' == '' and '$(DirectoryToBuild)' == ''">true</BuildNative>
<BuildManaged Condition="'$(BuildManaged)' == ''">true</BuildManaged>
<BuildPackages Condition="'$(BuildPackages)' == '' and '$(DirectoryToBuild)' == ''">true</BuildPackages>
<BuildDependsOn Condition="'$(BuildNative)' == 'true'">$(BuildDependsOn);BuildNative</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildManaged)' == 'true'">$(BuildDependsOn);BuildManaged</BuildDependsOn>
<BuildDependsOn Condition="'$(BuildPackages)' == 'true'">$(BuildDependsOn);Pack</BuildDependsOn>
<!-- Explicitly set Configuration based on BuildConfiguration for the root projects -->
<ProjectProperties>Configuration=$(BuildConfiguration)</ProjectProperties>
</PropertyGroup>
<Import Project="Directory.Build.targets" />
<Target Name="Restore" DependsOnTargets="GenerateConfigurationProps">
<ItemGroup Condition="'$(DirectoryToBuild)' == ''">
<_RestoreProjects Include="$(RepositoryEngineeringDir)restore\dirs.proj" Build="true" />
</ItemGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<_RestoreProjects Include="$(SourceDir)tests.proj" Build="false" />
</ItemGroup>
<MSBuild Projects="@(_RestoreProjects)" Targets="Restore" Properties="$(ProjectProperties)" />
<MSBuild Projects="@(_RestoreProjects)" Condition="'%(Build)' != 'false'" Properties="$(ProjectProperties)" />
</Target>
<Target Name="BuildNative">
<ItemGroup>
<_BuildNativeProjects Include="src\Native\build-native.proj" />
</ItemGroup>
<MSBuild Projects="@(_BuildNativeProjects)" Properties="$(ProjectProperties)" />
</Target>
<Target Name="BuildManaged">
<ItemGroup>
<_BuildMangedProjects Include="src\dirs.proj" />
</ItemGroup>
<MSBuild Projects="@(_BuildMangedProjects)" Properties="$(ProjectProperties)" />
</Target>
<Target Name="BuildTests">
<ItemGroup>
<_TestProjects Include="src\tests.proj" />
</ItemGroup>
<MSBuild Projects="@(_TestProjects)"
Targets="Build"
Properties="$(ProjectProperties)" />
</Target>
<Target Name="Test">
<ItemGroup>
<_TestProjects Include="src\tests.proj" />
</ItemGroup>
<MSBuild Projects="@(_TestProjects)"
Targets="Test"
Properties="$(ProjectProperties)" />
</Target>
<Target Name="Pack">
<ItemGroup>
<_PackProjects Include="src\packages.builds" />
</ItemGroup>
<MSBuild Projects="@(_PackProjects)" Properties="$(ProjectProperties)" />
</Target>
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<!-- set up inputs for UpdateVSConfigurations in a target to avoid globbing all the time -->
<Target Name="_setProjectsToUpdate" BeforeTargets="UpdateVSConfigurations">
<ItemGroup>
<ProjectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*csproj"
Exclude="$(MSBuildThisFileDirectory)src/shims/**/*.*csproj"/>
<ProjectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*ilproj" />
<ProjectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*vbproj" />
<_solutionsToUpdateFiles Include="$(MSBuildThisFileDirectory)src/*/Directory.Build.props" />
<SolutionsToUpdate Include="@(_solutionsToUpdateFiles->'%(RootDir)%(Directory)')" Exclude="@(_solutionsToExcludeFromUpdate)" />
</ItemGroup>
</Target>
<Import Project="$(RepositoryEngineeringDir)restore\uap-tools.targets" />
</Project>