[Build] Remove tools source (#744)
[platform/core/csapi/tizenfx.git] / build / build.proj
1 <Project DefaultTargets="Build">
2
3   <Import Project="$(MSBuildThisFileDirectory)directories.props" />
4
5   <!-- Build Properties -->
6   <PropertyGroup>
7     <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
8     <BuildWithAnalyzer Condition="'$(BuildWithAnalyzer)' == ''">False</BuildWithAnalyzer>
9   </PropertyGroup>
10
11   <!-- Projects to build -->
12   <ItemGroup>
13     <ProjectToBuild Include="$(ProjectSrcDir)\$(Project)\$(Project).csproj" Condition="'$(Project)' != ''" />
14     <ProjectToBuild Include="$(ProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
15     <ProjectToBuild Include="$(InternalProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
16   </ItemGroup>
17
18   <!-- Nuspec files to pack -->
19   <ItemGroup>
20     <NuspecFiles Include="$(ProjectRootDir)pkg\*.nuspec" />
21   </ItemGroup>
22
23   <!--
24     Target : Clean
25     ==============
26     Delete all artifacts,
27     including the Artifacts/ directory and the obj/ directories for all projects.
28   -->
29   <Target Name="Clean">
30
31     <ItemGroup>
32       <ProjectIntermediateAllFiles Include="$(ProjectSrcDir)**\obj\*" />
33       <ProjectIntermediateAllFiles Include="$(InternalProjectSrcDir)**\obj\*" />
34       <ProjectIntermediateDir Include="@(ProjectIntermediateAllFiles->'%(RootDir)%(Directory)'->Distinct())" />
35     </ItemGroup>
36
37     <ItemGroup>
38       <DirToRemove Include="$(OutputBaseDir)" />
39       <DirToRemove Include="@(ProjectIntermediateDir)" />
40     </ItemGroup>
41
42     <RemoveDir Directories="@(DirToRemove)" />
43
44   </Target>
45
46   <!--
47     Target : Restore
48     ==============
49     Restore all projects.
50   -->
51   <Target Name="Restore">
52
53     <MSBuild Projects="@(ProjectToBuild)"
54              Properties="Configuration=$(Configuration);RestoreSources=$(RestoreSources);BuildWithAnalyzer=$(BuildWithAnalyzer)"
55              BuildInParallel="false"
56              Targets="Restore" />
57
58   </Target>
59
60   <!--
61     Target : Build
62     ==============
63     Build all projects.
64   -->
65   <Target Name="Build">
66
67     <MSBuild Projects="@(ProjectToBuild)"
68              Properties="Configuration=$(Configuration);BuildWithAnalyzer=$(BuildWithAnalyzer)"
69              BuildInParallel="true"
70              UseResultsCache="true"
71              Targets="Rebuild" />
72
73     <MSBuild Projects="@(ProjectToBuild)"
74              Properties="Configuration=$(Configuration)"
75              BuildInParallel="false"
76              Targets="CopyToArtifactsDirectory" />
77
78   </Target>
79
80   <!--
81     Target : Pack
82     ==============
83     Generate nuget packages.
84   -->
85   <Target Name="Pack">
86
87     <MSBuild Projects="$(MSBuildThisFileDirectory)pack.csproj"
88              Properties="NoBuild=True"
89              Targets="Restore" />
90
91     <MSBuild Projects="$(MSBuildThisFileDirectory)pack.csproj"
92              Properties="NoBuild=True;Version=$(Version);NuspecFile=%(NuspecFiles.Identity)"
93              Targets="Pack" />
94
95   </Target>
96
97   <!--
98     Target : Dummy
99     ==============
100     Generate dummy assemblies of all projects.
101   -->
102   <Target Name="Dummy">
103
104     <PropertyGroup>
105       <APIToolPath>$(MSBuildThisFileDirectory)..\tools\bin\APITool.dll</APIToolPath>
106     </PropertyGroup>
107
108     <MakeDir Directories="$(OutputDummyDir)" />
109     <Exec Command="dotnet $([System.IO.Path]::GetFullPath('$(APIToolPath)')) dummy $(OutputPublicDir)ref $(OutputDummyDir) " />
110
111   </Target>
112
113 </Project>