Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Jain <radical@gmail.com>2017-08-12 00:53:45 +0300
committerGitHub <noreply@github.com>2017-08-12 00:53:45 +0300
commit43cec6c0dda0b5b0fbaaabc019a760965b573d55 (patch)
treecd3fc3e6e35dc8d733706fd3d0d81dbb00d96dff /mcs/packages
parent13dc0bb2c24d70bdf3c570574e92637f0b3da341 (diff)
Install Roslyn binaries, including msbuild tasks to msbuild/Roslyn (#5251)
.. directory, which is `$mono_prefix/lib/mono/msbuild/15.0/bin/Roslyn/` Mono installs `csc.exe` but the corresponding `Microsoft.Build.Tasks.CodeAnalysis.dll` required for supporting msbuild C# projects is installed by msbuild. But these two can get out of sync, like they did and had to be worked around in https://github.com/mono/msbuild/pull/19 . Instead, we now install all the relevant roslyn bits (C# and VB) from the same source. Only the msbuild specific files are copied to the Roslyn folder. VBCSCompiler, csi and their dependencies are symlinked from `lib/mono/4.5`. Also: - csi.exe is included since the tool is surfaced as an msbuild task, and that requires the *Scripting.dll assemblies. - VBCSCompiler* - shared compiler is installed - vbc.exe doesn't work on mono currently, so skipping that - And `Microsoft.DiaSymReader.Native.{amd64,x86}.dll` are dropped.
Diffstat (limited to 'mcs/packages')
-rw-r--r--mcs/packages/Makefile41
1 files changed, 36 insertions, 5 deletions
diff --git a/mcs/packages/Makefile b/mcs/packages/Makefile
index 34a4d83fa9c..9980aa9be99 100644
--- a/mcs/packages/Makefile
+++ b/mcs/packages/Makefile
@@ -3,24 +3,55 @@ include ../build/rules.make
ROSLYN_CSC_DIR = $(dir $(CSC_LOCATION))
-ROSLYN_FILES = \
+ROSLYN_FILES_FOR_MONO = \
$(ROSLYN_CSC_DIR)/csc.exe \
$(ROSLYN_CSC_DIR)/csc.rsp \
$(ROSLYN_CSC_DIR)/csc.exe.config \
+ $(ROSLYN_CSC_DIR)/csi.exe \
+ $(ROSLYN_CSC_DIR)/csi.exe.config \
+ $(ROSLYN_CSC_DIR)/csi.rsp \
$(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.CSharp.dll \
+ $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.CSharp.Scripting.dll \
+ $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.VisualBasic.dll \
$(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.dll \
+ $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.Scripting.dll \
$(ROSLYN_CSC_DIR)/System.Collections.Immutable.dll \
- $(ROSLYN_CSC_DIR)/System.Reflection.Metadata.dll
-
-DISTFILES = $(ROSLYN_FILES)
+ $(ROSLYN_CSC_DIR)/System.Reflection.Metadata.dll \
+ $(ROSLYN_CSC_DIR)/VBCSCompiler.exe \
+ $(ROSLYN_CSC_DIR)/VBCSCompiler.exe.config
+
+ROSLYN_FILES_TO_COPY_FOR_MSBUILD = \
+ $(ROSLYN_CSC_DIR)/Microsoft.Build.Tasks.CodeAnalysis.dll \
+ $(ROSLYN_CSC_DIR)/Microsoft.CSharp.Core.targets \
+ $(ROSLYN_CSC_DIR)/Microsoft.VisualBasic.Core.targets
+
+ROSLYN_FILES_TO_LINK_FOR_MSBUILD = \
+ csi.exe \
+ csi.exe.config \
+ csi.rsp \
+ Microsoft.CodeAnalysis.dll \
+ Microsoft.CodeAnalysis.CSharp.dll \
+ Microsoft.CodeAnalysis.CSharp.Scripting.dll \
+ Microsoft.CodeAnalysis.Scripting.dll \
+ System.Collections.Immutable.dll \
+ System.Reflection.Metadata.dll \
+ VBCSCompiler.exe \
+ VBCSCompiler.exe.config
+
+DISTFILES = $(ROSLYN_FILES_FOR_MONO) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD)
ifeq ($(PROFILE), $(DEFAULT_PROFILE))
TARGET_DIR = $(DESTDIR)$(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+MSBUILD_ROSLYN_DIR = $(DESTDIR)$(mono_libdir)/mono/msbuild/15.0/bin/Roslyn
install-local:
$(MKINSTALLDIRS) $(TARGET_DIR)
- $(INSTALL_LIB) $(ROSLYN_FILES) $(TARGET_DIR)
+ $(INSTALL_LIB) $(ROSLYN_FILES_FOR_MONO) $(TARGET_DIR)
+ $(MKINSTALLDIRS) $(MSBUILD_ROSLYN_DIR)
+ $(INSTALL_LIB) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD) $(MSBUILD_ROSLYN_DIR)
+
+ (cd $(MSBUILD_ROSLYN_DIR); for asm in $(ROSLYN_FILES_TO_LINK_FOR_MSBUILD); do ln -fs ../../../../$(FRAMEWORK_VERSION)/$$asm . ; done)
endif