[resgen] Implement conditional resources (#if/#ifdef)
[mono.git] / mcs / tools / xbuild / xbuild_test.make
1 XBUILD_DATA_DIR=$(topdir)/tools/xbuild/data
2 XBUILD_PROFILE_DIR=$(topdir)/class/lib/$(PROFILE)
3
4 # makes xbuild look in the class/lib/$PROFILE build directories for targets etc
5 export TESTING_MONO=a
6 export MSBuildExtensionsPath=$(XBUILD_DATA_DIR)
7 export XBUILD_FRAMEWORK_FOLDERS_PATH= $(topdir)/class/Microsoft.Build/xbuild-testing
8
9 ifeq (4.0, $(FRAMEWORK_VERSION))
10 NO_TEST=true
11 else
12 test-local: copy-targets $(test_lib).config
13 clean-local: clean-targets clean-test-config
14 endif
15
16 xbuild-net4-fail:
17         @echo "The net_4_0 profile contains reference assemblies only and cannot be installed/tested as an xbuild toolset"
18         @exit 1
19
20 $(test_lib).config: $(XBUILD_DATA_DIR)/xbuild.exe.config.in
21         sed -e 's/@ASM_VERSION@/$(XBUILD_ASSEMBLY_VERSION)/g' $(XBUILD_DATA_DIR)/xbuild.exe.config.in > $(test_lib).config
22
23 clean-test-config:
24         rm -f $(test_lib).config
25
26 copy-targets: copy-targets-$(XBUILD_VERSION)
27
28 clean-targets: clean-targets-$(XBUILD_VERSION)
29
30 XBUILD_4_0_PROFILE_DIR=$(topdir)/class/lib/net_4_5
31 XBUILD_12_0_PROFILE_DIR=$(topdir)/class/lib/xbuild_12
32 XBUILD_14_0_PROFILE_DIR=$(topdir)/class/lib/xbuild_14
33
34 copy-targets-4.0:
35         cp $(XBUILD_DATA_DIR)/4.0/Microsoft.Common.targets $(XBUILD_4_0_PROFILE_DIR)
36         cp $(XBUILD_DATA_DIR)/4.0/Microsoft.Common.tasks $(XBUILD_4_0_PROFILE_DIR)
37         cp $(XBUILD_DATA_DIR)/4.0/Microsoft.CSharp.targets $(XBUILD_4_0_PROFILE_DIR)
38         cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_4_0_PROFILE_DIR)
39
40 copy-targets-12.0:
41         cp $(XBUILD_DATA_DIR)/12.0/Microsoft.Common.targets $(XBUILD_12_0_PROFILE_DIR)
42         cp $(XBUILD_DATA_DIR)/12.0/Microsoft.Common.tasks $(XBUILD_12_0_PROFILE_DIR)
43         cp $(XBUILD_DATA_DIR)/12.0/Microsoft.CSharp.targets $(XBUILD_12_0_PROFILE_DIR)
44         cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_12_0_PROFILE_DIR)
45
46 copy-targets-14.0:
47         cp $(XBUILD_DATA_DIR)/14.0/Microsoft.Common.targets $(XBUILD_14_0_PROFILE_DIR)
48         cp $(XBUILD_DATA_DIR)/14.0/Microsoft.Common.tasks $(XBUILD_14_0_PROFILE_DIR)
49         cp $(XBUILD_DATA_DIR)/14.0/Microsoft.CSharp.targets $(XBUILD_14_0_PROFILE_DIR)
50         cp $(XBUILD_DATA_DIR)/Microsoft.VisualBasic.targets $(XBUILD_14_0_PROFILE_DIR)
51
52 clean-targets-4.0:
53         rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.Common.targets
54         rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.Common.tasks
55         rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.CSharp.targets
56         rm -f $(XBUILD_4_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
57
58 clean-targets-12.0:
59         rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.Common.targets
60         rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.Common.tasks
61         rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.CSharp.targets
62         rm -f $(XBUILD_12_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
63
64 clean-targets-14.0:
65         rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.Common.targets
66         rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.Common.tasks
67         rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.CSharp.targets
68         rm -f $(XBUILD_14_0_PROFILE_DIR)/Microsoft.VisualBasic.targets
69
70 #allow tests to find older versions of libs and targets
71 ifneq (4.0, $(XBUILD_VERSION))
72 TEST_MONO_PATH := $(topdir)/class/lib/net_4_5$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)
73 copy-targets: copy-targets-4.0
74 clean-targets: clean-targets-4.0
75 endif