[xbuild] Don't show the deprecation notice for minimal or quiet logging
[mono.git] / mcs / tools / xbuild / xbuild_test.make
index 1917f88bd89544c312c90c70a7e6bfb64477bd75..4c503c060ac3b432270f45b7367477750751875d 100644 (file)
@@ -1,38 +1,75 @@
-XBUILD_TARGETS_DIR=$(topdir)/tools/xbuild/xbuild
+XBUILD_DATA_DIR=$(topdir)/tools/xbuild/data
 XBUILD_PROFILE_DIR=$(topdir)/class/lib/$(PROFILE)
 
 # makes xbuild look in the class/lib/$PROFILE build directories for targets etc
 export TESTING_MONO=a
+export MSBuildExtensionsPath=$(XBUILD_DATA_DIR)
+export XBUILD_FRAMEWORK_FOLDERS_PATH= $(topdir)/class/Microsoft.Build/xbuild-testing
 
-test-local: copy-targets $(test_lib).config
+ifeq (4.0, $(FRAMEWORK_VERSION))
+NO_TEST=true
+else
+test-local: copy-targets Test/test-config-file-$(PROFILE)
+clean-local: clean-targets clean-test-config
+endif
 
-copy-targets:
-       cp $(XBUILD_TARGETS_DIR)/$(XBUILD_VERSION)/Microsoft.Common.targets $(XBUILD_PROFILE_DIR)
-       cp $(XBUILD_TARGETS_DIR)/$(XBUILD_VERSION)/Microsoft.Common.tasks $(XBUILD_PROFILE_DIR)
-       cp $(XBUILD_TARGETS_DIR)/Microsoft.CSharp.targets $(XBUILD_PROFILE_DIR)
-       cp $(XBUILD_TARGETS_DIR)/Microsoft.VisualBasic.targets $(XBUILD_PROFILE_DIR)
+xbuild-net4-fail:
+       @echo "The net_4_0 profile contains reference assemblies only and cannot be installed/tested as an xbuild toolset"
+       @exit 1
 
-clean-local: clean-target-files clean-test-config
+Test/test-config-file-$(PROFILE): $(XBUILD_DATA_DIR)/xbuild.exe.config_test.in
+       sed -e 's/@ASM_VERSION@/$(XBUILD_ASSEMBLY_VERSION)/g' $(XBUILD_DATA_DIR)/xbuild.exe.config_test.in > Test/test-config-file-$(PROFILE)
 
-clean-target-files:
-       rm -f $(XBUILD_PROFILE_DIR)/Microsoft.Common.targets
-       rm -f $(XBUILD_PROFILE_DIR)/Microsoft.Common.tasks
-       rm -f $(XBUILD_PROFILE_DIR)/Microsoft.CSharp.targets
-       rm -f $(XBUILD_PROFILE_DIR)/Microsoft.VisualBasic.targets
+clean-test-config:
+       rm -f Test/test-config-file-$(PROFILE)
 
-$(test_lib).config: $(XBUILD_DIR)/xbuild.exe.config.in
-       sed -e 's/@XBUILD_ASSEMBLY_VERSION@/$(XBUILD_ASSEMBLY_VERSION)/g' $(XBUILD_DIR)/xbuild.exe.config.in > $(test_lib).config
+copy-targets: copy-targets-$(XBUILD_VERSION)
 
-clean-test-config:
-       rm -f $(test_lib).config
+clean-targets: clean-targets-$(XBUILD_VERSION)
+
+XBUILD_4_0_PROFILE_DIR=$(topdir)/class/lib/net_4_x
+XBUILD_12_0_PROFILE_DIR=$(topdir)/class/lib/xbuild_12
+XBUILD_14_0_PROFILE_DIR=$(topdir)/class/lib/xbuild_14
+
+copy-targets-4.0:
+       cp $(XBUILD_DATA_DIR)/4.0/Microsoft.Common.targets $(XBUILD_4_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/4.0/Microsoft.Common.tasks $(XBUILD_4_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/4.0/Microsoft.CSharp.targets $(XBUILD_4_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_4_0_PROFILE_DIR)
+
+copy-targets-12.0:
+       cp $(XBUILD_DATA_DIR)/12.0/Microsoft.Common.targets $(XBUILD_12_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/12.0/Microsoft.Common.tasks $(XBUILD_12_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/12.0/Microsoft.CSharp.targets $(XBUILD_12_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_12_0_PROFILE_DIR)
 
-#allow tests to find older versions of libs
-ifneq (2.0, $(XBUILD_VERSION))
-TEST_MONO_PATH := $(topdir)/class/lib/net_2_0
-ifneq (3.5, $(XBUILD_VERSION))
-TEST_MONO_PATH := $(topdir)/class/lib/net_3_5$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)
+copy-targets-14.0:
+       cp $(XBUILD_DATA_DIR)/14.0/Microsoft.Common.targets $(XBUILD_14_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/14.0/Microsoft.Common.tasks $(XBUILD_14_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/14.0/Microsoft.CSharp.targets $(XBUILD_14_0_PROFILE_DIR)
+       cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_14_0_PROFILE_DIR)
+
+clean-targets-4.0:
+       rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.Common.targets
+       rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.Common.tasks
+       rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.CSharp.targets
+       rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
+
+clean-targets-12.0:
+       rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.Common.targets
+       rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.Common.tasks
+       rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.CSharp.targets
+       rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
+
+clean-targets-14.0:
+       rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.Common.targets
+       rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.Common.tasks
+       rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.CSharp.targets
+       rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
+
+#allow tests to find older versions of libs and targets
 ifneq (4.0, $(XBUILD_VERSION))
-TEST_MONO_PATH := $(topdir)/class/lib/net_4_5$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)
-endif
-endif
+TEST_MONO_PATH := $(topdir)/class/lib/net_4_x$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)
+copy-targets: copy-targets-4.0
+clean-targets: clean-targets-4.0
 endif