[msbuild] Install a `deniedAssembliesList.txt` to support denied ... (#5358)
[mono.git] / mcs / tools / xbuild / Makefile
index 9d6e914532dad6265dc577dd2bbe6c0e176d5895..20268929bff93d35118ce83778a464fe510710cc 100644 (file)
@@ -14,14 +14,11 @@ include ../../build/executable.make
 XBUILD_DIR=.
 include $(XBUILD_DIR)/xbuild_test.make
 
-ifeq (4.0, $(FRAMEWORK_VERSION))
-install-local: xbuild-net4-fail
-else
 install-local: install-extras
-endif
 
-PORTABLE_TARGETS_SRC=../../../external/buildtools/src/Portable/Targets
-PCL5_FX_SRC=../../../external/buildtools/src/Portable/Frameworks/v5.0
+PORTABLE_TARGETS_SRC:=data/Portable/Targets
+PCL5_FX_SRC:=data/Portable/Frameworks/v5.0
+DENIED_ASSEMBLY_LIST_SRC=data/deniedAssembliesList.txt
 
 NETFRAMEWORK_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETFramework
 PCL5_FX_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETPortable/v5.0
@@ -39,7 +36,7 @@ endif
 install-versioned-files: install-bin-data install-nuget-imports
 
 #install files that are only installed once across all xbuild versions
-install-global-files: install-frameworks install-web-targets install-pcl-targets install-pcl5-framework install-nuget-targets
+install-global-files: install-frameworks install-web-targets install-pcl-targets install-pcl5-framework install-nuget-targets install-msbuild-specific-files
 
 install-bin-data:
        $(MKINSTALLDIRS) $(DESTDIR)$(XBUILD_BIN_DIR)/MSBuild
@@ -77,6 +74,10 @@ install-frameworks:
        $(INSTALL_DATA) frameworks/net_4.6.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.6/RedistList/FrameworkList.xml
        $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.6.1/RedistList
        $(INSTALL_DATA) frameworks/net_4.6.1.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.6.1/RedistList/FrameworkList.xml
+       $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.6.2/RedistList
+       $(INSTALL_DATA) frameworks/net_4.6.2.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.6.2/RedistList/FrameworkList.xml
+       $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.7/RedistList
+       $(INSTALL_DATA) frameworks/net_4.7.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.7/RedistList/FrameworkList.xml
 
 install-pcl-targets:
        $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)
@@ -91,16 +92,10 @@ install-pcl-targets:
        done
 
 install-web-targets:
-       $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v9.0/WebApplications
-       $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v9.0/WebApplications
-       $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v10.0/WebApplications
-       $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v10.0/WebApplications
-       $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v11.0/WebApplications
-       $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v11.0/WebApplications
-       $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v12.0/WebApplications
-       $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v12.0/WebApplications
-       $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v14.0/WebApplications
-       $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v14.0/WebApplications
+       for VERSION in v9.0 v10.0 v11.0 v12.0 v14.0 v15.0; do \
+               $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/$$VERSION/WebApplications; \
+               $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/$$VERSION/WebApplications; \
+       done
 
 NUGET_BUILDTASKS_REPO_DIR=$(topdir)/../external/nuget-buildtasks
 
@@ -128,9 +123,14 @@ install-pcl5-framework:
        $(INSTALL_DATA) "$(PCL5_FX_SRC)/ASP.NET Core 1.0.xml" "$(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks/ASP.NET Core 1.0.xml"
        $(INSTALL_DATA) "$(PCL5_FX_SRC)/Windows Universal 10.0.xml" "$(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks/Windows Universal 10.0.xml"
 
+install-msbuild-specific-files:
+       $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild
+       $(INSTALL_DATA) $(DENIED_ASSEMBLY_LIST_SRC) $(DESTDIR)$(mono_libdir)/mono/xbuild
+
 EXTRA_DISTFILES = \
        data/xbuild.rsp \
        data/xbuild.exe.config.in \
+       data/xbuild.exe.config_test.in \
        data/Microsoft.Build.xsd \
        data/2.0/Microsoft.Common.tasks \
        data/3.5/Microsoft.Common.tasks \
@@ -151,6 +151,25 @@ EXTRA_DISTFILES = \
        data/Microsoft.VisualBasic.targets \
        data/MSBuild/Microsoft.Build.CommonTypes.xsd \
        data/MSBuild/Microsoft.Build.Core.xsd \
+       data/Portable/Targets/Microsoft.Portable.Core.props \
+       data/Portable/Targets/Microsoft.Portable.Core.targets \
+       data/Portable/Targets/v4.0/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v4.0/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v4.0/Microsoft.Portable.VisualBasic.targets \
+       data/Portable/Targets/v4.5/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v4.5/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v4.5/Microsoft.Portable.VisualBasic.targets \
+       data/Portable/Targets/v4.6/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v4.6/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v4.6/Microsoft.Portable.VisualBasic.targets \
+       data/Portable/Targets/v5.0/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v5.0/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v5.0/Microsoft.Portable.VisualBasic.targets \
+       "data/Portable/Frameworks/v5.0/.NET Framework 4.6.xml" \
+       "data/Portable/Frameworks/v5.0/ASP.NET Core 1.0.xml" \
+       "data/Portable/Frameworks/v5.0/FrameworkList.xml" \
+       "data/Portable/Frameworks/v5.0/Windows Universal 10.0.xml" \
+       data/deniedAssembliesList.txt \
        frameworks/net_2.0.xml \
        frameworks/net_3.0.xml \
        frameworks/net_3.5.xml \
@@ -161,6 +180,8 @@ EXTRA_DISTFILES = \
        frameworks/net_4.5.2.xml \
        frameworks/net_4.6.xml \
        frameworks/net_4.6.1.xml \
+       frameworks/net_4.6.2.xml \
+       frameworks/net_4.7.xml \
        targets/Microsoft.WebApplication.targets        \
        $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props       \
        $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets      \