diff options
author | Alex Ghiondea <ghiondea.alexandru@microsoft.com> | 2015-02-18 16:26:30 -0800 |
---|---|---|
committer | Alex Ghiondea <ghiondea.alexandru@microsoft.com> | 2015-02-19 11:24:20 -0800 |
commit | fbc318cfd987694d04431aa4858e299d712af940 (patch) | |
tree | aee74df1df62da0486580d743a120182c4e9f1c3 /build.proj | |
parent | f846ccff6be6b47f139a6b910cae20de54f54329 (diff) | |
download | coreclr-fbc318cfd987694d04431aa4858e299d712af940.tar.gz coreclr-fbc318cfd987694d04431aa4858e299d712af940.tar.bz2 coreclr-fbc318cfd987694d04431aa4858e299d712af940.zip |
Setup the CoreCLR repo to use the LocalPackagePublish mechanism.
This will enable the 'local publish' of the CoreCLR package to a location where
it can be picked up by the CoreFx build. What this means is that you will be able
to build the CoreCLR package and use that to run the CoreFx tests on top of it.
Changes required to make this happen:
- Refactor the managed build to make sure the buildtools gets restored before
we attempt to use the targets it provides.
- Take a dependency to the Microsoft.DotNet.BuildTools to bring in the packages.targets
- Update the $(PackagesDir) to point to the <repo root>\packages to make it consistent with CoreFx
- Hook-up the LocalPackagePublish targets to the build of the CoreCLR NuGet packages
Diffstat (limited to 'build.proj')
-rw-r--r-- | build.proj | 80 |
1 files changed, 3 insertions, 77 deletions
diff --git a/build.proj b/build.proj index b1d6dfacaf..95b7a6ec68 100644 --- a/build.proj +++ b/build.proj @@ -2,86 +2,12 @@ <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="dir.props" /> - <!-- Inline task to bootstrap the build to enable downloading nuget.exe --> - <UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"> - <ParameterGroup> - <Address ParameterType="System.String" Required="true"/> - <FileName ParameterType="System.String" Required="true" /> - </ParameterGroup> - <Task> - <Reference Include="System" /> - <Code Type="Fragment" Language="cs"> - <![CDATA[ - var directory = System.IO.Path.GetDirectoryName(FileName); - System.IO.Directory.CreateDirectory(directory); - var client = new System.Net.WebClient(); - client.Proxy = System.Net.WebRequest.DefaultWebProxy; - client.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; - client.DownloadFile(Address, FileName); - ]]> - </Code> - </Task> - </UsingTask> - - <Target Name="_RestoreBuildTools" - BeforeTargets="Build" - Inputs="$(BuildToolsTargetInputs)" - Outputs="$(BuildToolsTargetOutputs)" - > - - <!-- Download latest nuget.exe --> - <DownloadFile - Condition="!Exists($(NuGetToolPath))" - Address="http://nuget.org/nuget.exe" - FileName="$(NuGetToolPath)" /> - - <!-- Restore build tools --> - <Exec - StandardOutputImportance="Low" - Command=""$(NuGetToolPath)" install " $(SourceDir).nuget\packages.config " -o " $(ToolsDir) " $(NuGetConfigCommandLine)" /> - - <Touch Files="$(BuildToolsInstallSemaphore)" AlwaysCreate="true" /> - </Target> - - <!-- Setup Nuget properties --> - <ItemGroup> - <NuSpecSrcs Include="$(PackagesDir)Microsoft.DotNet.CoreCLR.nuspec" /> - <NuSpecSrcs Condition="'$(Configuration)'=='Release'" Include="$(PackagesDir)Microsoft.DotNet.CoreCLR.Development.nuspec" /> - <NuSpecSrcs Condition="'$(Configuration)'=='Debug'" Include="$(PackagesDir)Microsoft.DotNet.CoreCLR.Debug.Development.nuspec" /> - </ItemGroup> <ItemGroup> - <!-- Backslash appended, see note in dir.props about the PackagesBinDir property --> - <NuSpecs Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.nuspec" /> - <NuSpecs Condition="'$(Configuration)'=='Release'" Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.Development.nuspec" /> - <NuSpecs Condition="'$(Configuration)'=='Debug'" Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.Debug.Development.nuspec" /> + <!-- We use build.proj instead of dirs.proj so we don't conflict with the TFS build--> + <Project Include="src\build.proj" /> </ItemGroup> - <!-- Generate Microsoft.Dotnet.CoreCLR nuget package and associated development package --> - <Target Name="BuildNuGetPackages" AfterTargets="MovePDB" Condition="'$(BuildNugetPackage)' != 'false'"> - <MakeDir Directories="$(PackagesBinDir)" Condition="!Exists('$(PackagesBinDir)')" /> - <Copy SourceFiles="@(NuSpecSrcs)" DestinationFolder="$(PackagesBinDir)" /> - <Exec Command=""$(NuGetToolPath)" pack "%(NuSpecs.Identity)" -NoPackageAnalysis -NoDefaultExcludes -OutputDirectory "$(PackagesBinDir)"" /> - </Target> - - <ItemGroup> - <PDBSToMove Include="$(BinDir)mscorlib.pdb"/> - </ItemGroup> - - <PropertyGroup> - <MscorlibPDBPath>$(BinDir)mscorlib.pdb</MscorlibPDBPath> - </PropertyGroup> - - <Target Name="MovePDB" AfterTargets="Build"> - <Move Condition="Exists($(MscorlibPDBPath))" - SourceFiles="@(PDBSToMove)" - DestinationFolder="$(BinDir)PDB" - /> - </Target> - - <!-- Build mscorlib --> - <ItemGroup> - <Project Include="src\mscorlib\mscorlib.csproj" /> - </ItemGroup> + <Import Project="dir.targets" /> <Import Project="dir.traversal.targets" /> |