Skip to content

Commit

Permalink
Merge pull request #1 from dsyme/smoothdeveloper-dotnet-restore-only-…
Browse files Browse the repository at this point in the history
…if-coreclr-enabled

fix to build
  • Loading branch information
smoothdeveloper committed Jul 22, 2016
2 parents 7c2518e + c257574 commit a592486
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
7 changes: 4 additions & 3 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ There are various qualifiers:
build.cmd debug -- build debug instead of release

build.cmd proto -- force the rebuild of the Proto bootstrap compiler in addition to other things
build.cmd protofx -- build using a .NET Framework proto (no .NET Core is used)

build.cmd coreclr -- build/tests only the coreclr version compiler (not the Visual F# IDE Tools)
build.cmd compiler -- build/tests only the compiler (not the Visual F# IDE Tools)
build.cmd net40 -- build/tests for .NET Framework version of the compiler (not the Visual F# IDE Tools or .NET Core)
build.cmd coreclr -- build/tests only the coreclr version compiler (not the Visual F# IDE Tools or .NET Framework)
build.cmd vs -- build/tests the Visual F# IDE Tools
build.cmd pcls -- build/tests the PCL FSharp.Core libraries

Expand All @@ -44,7 +45,7 @@ There are various qualifiers:

build.cmd test-smoke -- build, run smoke tests
build.cmd test-coreunit -- build, run FSharp.Core tests
build.cmd test-coreclr -- build, run CoreCLR tests
build.cmd test-coreclr -- build, run .NET Core tests
build.cmd test-pcls -- build, run PCL tests
build.cmd test-fsharp -- build, run tests\fsharp suite
build.cmd test-fsharpqa -- build, run tests\fsharpqa suite
Expand Down
14 changes: 13 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ exit /b 1

:ARGUMENTS_OK

set BUILD_PROTO_WITH_CORECLR_LKG=1

set BUILD_PROTO=0
set BUILD_NET40=1
set BUILD_CORECLR=0
Expand Down Expand Up @@ -100,6 +102,11 @@ if /i '%ARG%' == 'all' (
set SKIP_EXPENSIVE_TESTS=0
)

if /i '%ARG%' == 'protofx' (
set BUILD_PROTO_WITH_CORECLR_LKG=0
set BUILD_PROTO=1
)

if /i '%ARG%' == 'microbuild' (
set BUILD_PROTO=1
set BUILD_NET40=1
Expand Down Expand Up @@ -257,6 +264,7 @@ REM after this point, ARG variable should not be used, use only BUILD_* or TEST_
echo Build/Tests configuration:
echo.
echo BUILD_PROTO=%BUILD_PROTO%
echo BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG%
echo BUILD_NET40=%BUILD_NET40%
echo BUILD_CORECLR=%BUILD_CORECLR%
echo BUILD_PORTABLE=%BUILD_PORTABLE%
Expand Down Expand Up @@ -327,7 +335,7 @@ if '%RestorePackages%' == 'true' (
.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
)
if '%BUILD_CORECLR%' == '1' (
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (

:: Restore the Tools directory
call %~dp0init-tools.cmd
Expand Down Expand Up @@ -358,6 +366,10 @@ if '%BUILD_CORECLR%' == '1' (
popd

)
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '0' (
rmdir /s .\lkg\bin\debug
)

rem copy targestfile into tools directory ... temporary fix until packaging complete.
copy src\fsharp\FSharp.Build\Microsoft.FSharp.targets tools\Microsoft.FSharp.targets
copy src\fsharp\FSharp.Build\Microsoft.Portable.FSharp.targets tools\Microsoft.Portable.FSharp.targets
Expand Down
25 changes: 19 additions & 6 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -739,12 +739,25 @@

<Choose>
<When Condition="'$(BuildWith)' == 'LKG'">
<PropertyGroup>
<FSharpTargetsPath>..\lkg\FSharp-$(LkgVersion)\bin\Microsoft.FSharp.Targets</FSharpTargetsPath>
<FscToolPath>$(FSharpSourcesRoot)\..\lkg\bin\Debug\netstandard1.6\win7-x64\publish</FscToolPath>
<FSLKGPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FSLKGPath>
<FSCoreLKGPath>$(FSLKGPath)\FSharp.Core.dll</FSCoreLKGPath>
</PropertyGroup>
<Choose>
<When Condition="Exists('$(FSharpSourcesRoot)\..\lkg\bin\Debug\netstandard1.6\win7-x64\publish\fsc.exe')">
<PropertyGroup >
<FSharpTargetsPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin\Microsoft.FSharp.Targets</FSharpTargetsPath>
<FscToolPath>$(FSharpSourcesRoot)\..\lkg\bin\Debug\netstandard1.6\win7-x64\publish</FscToolPath>
<FSLKGPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FSLKGPath>
<FSCoreLKGPath>$(FSLKGPath)\FSharp.Core.dll</FSCoreLKGPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup >
<FSharpTargetsPath>..\lkg\FSharp-$(LkgVersion)\bin\Microsoft.FSharp.Targets</FSharpTargetsPath>
<FscToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FscToolPath>
<FSLKGPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FSLKGPath>
<FSCoreLKGPath>$(FSLKGPath)\FSharp.Core.dll</FSCoreLKGPath>
</PropertyGroup>
</Otherwise>
</Choose>

</When>
<When Condition="'$(TargetFramework)'=='portable47' OR '$(TargetFramework)'=='portable7' OR '$(TargetFramework)'=='portable78' OR '$(TargetFramework)'=='portable259' OR '$(TargetFramework)'=='coreclr'">
<PropertyGroup>
Expand Down

0 comments on commit a592486

Please sign in to comment.