forked from dotnet/roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (59 loc) · 2.89 KB
/
Makefile
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
SHELL = /bin/bash
OS_NAME = $(shell uname -s)
NUGET_PACKAGE_NAME = nuget.42
BUILD_CONFIGURATION = Debug
BOOTSTRAP_PATH = $(shell pwd)/Binaries/Bootstrap
BUILD_LOG_PATH =
XUNIT_VERSION = 2.1.0
MSBUILD_ADDITIONALARGS := /v:m /fl /fileloggerparameters:Verbosity=normal /p:DebugSymbols=false /p:Configuration=$(BUILD_CONFIGURATION)
ifeq ($(OS_NAME),Linux)
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:BaseNuGetRuntimeIdentifier=ubuntu.14.04
MONO_TOOLSET_NAME = mono.linux.4
ROSLYN_TOOLSET_NAME = roslyn.linux.2
else ifeq ($(OS_NAME),Darwin)
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:BaseNuGetRuntimeIdentifier=osx.10.10
MONO_TOOLSET_NAME = mono.mac.5
ROSLYN_TOOLSET_NAME = roslyn.mac.2
endif
ifneq ($(BUILD_LOG_PATH),)
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /fileloggerparameters:LogFile=$(BUILD_LOG_PATH)
endif
ifeq ($(BOOTSTRAP),true)
ROSLYN_TOOLSET_PATH = $(BOOTSTRAP_PATH)
else
ROSLYN_TOOLSET_PATH = /tmp/$(ROSLYN_TOOLSET_NAME)
endif
MONO_PATH = /tmp/$(MONO_TOOLSET_NAME)/bin/mono
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:MonoToolsetPath=$(MONO_PATH)
TOOLSET_ARGS = $(MSBUILD_ADDITIONALARGS) /p:CscToolPath=$(ROSLYN_TOOLSET_PATH) /p:CscToolExe=csc /p:VbcToolPath=$(ROSLYN_TOOLSET_PATH) /p:VbcToolExe=vbc
all: toolset
$(MONO_PATH) ~/.nuget/packages/Microsoft.Build.Mono.Debug/14.1.0-prerelease/lib/MSBuild.exe $(TOOLSET_ARGS) CrossPlatform.sln
bootstrap: toolset
$(MONO_PATH) ~/.nuget/packages/Microsoft.Build.Mono.Debug/14.1.0-prerelease/lib/MSBuild.exe $(TOOLSET_ARGS) src/Compilers/CSharp/CscCore/CscCore.csproj ; \
$(MONO_PATH) ~/.nuget/packages/Microsoft.Build.Mono.Debug/14.1.0-prerelease/lib/MSBuild.exe $(TOOLSET_ARGS) src/Compilers/VisualBasic/VbcCore/VbcCore.csproj ; \
mkdir -p $(BOOTSTRAP_PATH) ; \
cp Binaries/$(BUILD_CONFIGURATION)/csccore/* $(BOOTSTRAP_PATH) ; \
cp Binaries/$(BUILD_CONFIGURATION)/vbccore/* $(BOOTSTRAP_PATH) ; \
rm -rf Binaries/$(BUILD_CONFIGURATION)
test:
build/scripts/tests.sh $(MONO_PATH) $(BUILD_CONFIGURATION) $(XUNIT_VERSION)
clean:
@rm -rf Binaries
toolset: /tmp/$(ROSLYN_TOOLSET_NAME).tar.bz2 /tmp/$(MONO_TOOLSET_NAME).tar.bz2 /tmp/$(NUGET_PACKAGE_NAME).zip
clean_toolset:
rm /tmp/$(ROSLYN_TOOLSET_NAME).tar.bz2 \
rm /tmp/$(MONO_TOOLSET_NAME).tar.bz2 \
rm /tmp/$(NUGET_PACKAGE_NAME).tar.bz2 \
/tmp/$(ROSLYN_TOOLSET_NAME).tar.bz2:
@pushd /tmp/ ; \
curl -O https://dotnetci.blob.core.windows.net/roslyn/$(ROSLYN_TOOLSET_NAME).tar.bz2 ; \
tar -jxf $(ROSLYN_TOOLSET_NAME).tar.bz2
/tmp/$(MONO_TOOLSET_NAME).tar.bz2:
@pushd /tmp/ ; \
curl -O https://dotnetci.blob.core.windows.net/roslyn/$(MONO_TOOLSET_NAME).tar.bz2 ; \
tar -jxf $(MONO_TOOLSET_NAME).tar.bz2
/tmp/$(NUGET_PACKAGE_NAME).zip:
@pushd /tmp/ ; \
curl -O https://dotnetci.blob.core.windows.net/roslyn/$(NUGET_PACKAGE_NAME).zip ; \
unzip -uoq $(NUGET_PACKAGE_NAME).zip -d ~/ ; \
chmod +x ~/.nuget/packages/Microsoft.Build.Mono.Debug/14.1.0-prerelease/lib/MSBuild.exe