Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
have makefile make the same bootstrap dir as the build.ps1 file does …
…to ensure consistency
  • Loading branch information
baronfel committed Mar 25, 2019
commit 5e20f8490bebe0d5c8ce5d9aa92a4b2aa6c12eb8
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
Configuration ?= release
DotNetVersion = `cat DotnetCLIToolsVersion.txt`
DotNetToolPath = $(CURDIR)/artifacts/toolset/dotnet
ArtifactsDir ?= $(CURDIR)/artifacts
DotNetToolPath = $(ArtifactsDir)/toolset/dotnet
DotNetExe = "$(DotNetToolPath)/dotnet"

all: proto restore build test

tools:
$(CURDIR)/scripts/dotnet-install.sh --version $(DotNetVersion) --install-dir "$(DotNetToolPath)"

proto: tools
shutdown: tools
$(DotNetExe) build-server shutdown

proto-restore: tools
$(DotNetExe) restore src/buildtools/buildtools.proj
$(DotNetExe) restore src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) restore src/fsharp/fsc/fsc.fsproj

buildtools: proto-restore
$(DotNetExe) build src/buildtools/buildtools.proj -c Proto
#ensure destination dir
mkdir -p $(ArtifactsDir)/Bootstrap
cp $(ArtifactsDir)/bin/fslex/Proto/netcoreapp2.0/* $(ArtifactsDir)/Bootstrap
cp $(ArtifactsDir)/bin/fsyacc/Proto/netcoreapp2.0/* $(ArtifactsDir)/Bootstrap

proto: buildtools
$(DotNetExe) build src/fsharp/FSharp.Build/FSharp.Build.fsproj -c Proto
$(DotNetExe) build src/fsharp/fsc/fsc.fsproj -c Proto

Expand Down
8 changes: 4 additions & 4 deletions src/buildtools/buildtools.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
BeforeTargets="CoreCompile">

<PropertyGroup>
<FsLexPath Condition="'$(FsLexPath)' == ''">$(ArtifactsDir)\bin\fslex\Proto\netcoreapp2.0\fslex.dll</FsLexPath>
<FsLexPath Condition="'$(FsLexPath)' == ''">$(ArtifactsDir)\Bootstrap\fslex.dll</FsLexPath>
</PropertyGroup>

<!-- Create the output directory -->
<MakeDir Directories="$(FsLexOutputFolder)"/>

<!-- Run the tool -->
<Exec Command="$(DotNetTool) $(FsLexPath) -o $(FsLexOutputFolder)%(FsLex.Filename).fs %(FsLex.OtherFlags) %(FsLex.Identity)" />
<Exec Command="&quot;$(DotNetTool)&quot; &quot;$(FsLexPath)&quot; -o &quot;$(FsLexOutputFolder)%(FsLex.Filename).fs&quot; %(FsLex.OtherFlags) %(FsLex.Identity)" />

<!-- Make sure it will get cleaned -->
<CreateItem Include="$(FsLexOutputFolder)%(FsLex.Filename).fs">
Expand All @@ -43,14 +43,14 @@
BeforeTargets="CoreCompile">

<PropertyGroup>
<FsYaccPath Condition="'$(FsYaccPath)' == ''">$(ArtifactsDir)\bin\fsyacc\Proto\netcoreapp2.0\fsyacc.dll</FsYaccPath>
<FsYaccPath Condition="'$(FsYaccPath)' == ''">$(ArtifactsDir)\Bootstrap\fsyacc.dll</FsYaccPath>
</PropertyGroup>

<!-- Create the output directory -->
<MakeDir Directories="$(FsYaccOutputFolder)" />

<!-- Run the tool -->
<Exec Command="$(DotNetTool) $(FsYaccPath) -o $(FsYaccOutputFolder)%(FsYacc.Filename).fs %(FsYacc.OtherFlags) %(FsYacc.Identity)" />
<Exec Command="&quot;$(DotNetTool)&quot; &quot;$(FsYaccPath)&quot; -o &quot;$(FsYaccOutputFolder)%(FsYacc.Filename).fs&quot; %(FsYacc.OtherFlags) %(FsYacc.Identity)" />

<!-- Make sure it will get cleaned -->
<CreateItem Include="$(FsYaccOutputFolder)%(FsYacc.Filename).fs">
Expand Down