[MSBuild] Fix minor assembly resolution issue
[mono.git] / mcs / tools / xbuild / Makefile
1 thisdir = tools/xbuild
2 SUBDIRS = 
3 include ../../build/rules.make
4 NO_TESTS = yes
5
6 include xbuild.make
7
8 LOCAL_MCS_FLAGS = -r:$(XBUILD_FRAMEWORK) -r:$(XBUILD_UTILITIES) -r:$(XBUILD_ENGINE)
9 PROGRAM = xbuild.exe
10
11 include ../../build/executable.make
12
13 XBUILD_DIR=.
14 include $(XBUILD_DIR)/xbuild_test.make
15
16 ifeq (4.0, $(FRAMEWORK_VERSION))
17 install-local: xbuild-net4-fail
18 else
19 install-local: install-extras
20 endif
21
22 NETFRAMEWORK_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETFramework
23 VS_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/VisualStudio
24 PORTABLE_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Portable
25
26
27 install-extras: install-bin-data install-frameworks install-pcl-targets install-web-targets
28
29 install-bin-data:
30         $(MKINSTALLDIRS) $(DESTDIR)$(XBUILD_BIN_DIR)/MSBuild
31         $(INSTALL_DATA) data/xbuild.rsp $(DESTDIR)$(XBUILD_BIN_DIR)
32         $(INSTALL_DATA) data/$(XBUILD_VERSION)/Microsoft.Common.tasks $(DESTDIR)$(XBUILD_BIN_DIR)
33         $(INSTALL_DATA) data/$(XBUILD_VERSION)/Microsoft.Common.targets $(DESTDIR)$(XBUILD_BIN_DIR)
34         $(INSTALL_DATA) data/$(XBUILD_VERSION)/Microsoft.CSharp.targets $(DESTDIR)$(XBUILD_BIN_DIR)
35         $(INSTALL_DATA) data/Microsoft.Build.xsd $(DESTDIR)$(XBUILD_BIN_DIR)
36         $(INSTALL_DATA) data/Microsoft.VisualBasic.targets $(DESTDIR)$(XBUILD_BIN_DIR)
37         $(INSTALL_DATA) data/MSBuild/Microsoft.Build.CommonTypes.xsd $(DESTDIR)$(XBUILD_BIN_DIR)/MSBuild
38         $(INSTALL_DATA) data/MSBuild/Microsoft.Build.Core.xsd $(DESTDIR)$(XBUILD_BIN_DIR)/MSBuild
39         sed -e 's/@ASM_VERSION@/$(XBUILD_ASSEMBLY_VERSION)/g' data/xbuild.exe.config.in > $(DESTDIR)$(XBUILD_BIN_DIR)/xbuild.exe.config
40
41 install-frameworks:
42         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v$(FRAMEWORK_VERSION)/RedistList
43         $(INSTALL_DATA) frameworks/net_$(FRAMEWORK_VERSION).xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v$(FRAMEWORK_VERSION)/RedistList/FrameworkList.xml
44         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v2.0/RedistList
45         $(INSTALL_DATA) frameworks/net_2.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v2.0/RedistList/FrameworkList.xml
46         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.0/RedistList
47         $(INSTALL_DATA) frameworks/net_3.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.0/RedistList/FrameworkList.xml
48         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.5/RedistList
49         $(INSTALL_DATA) frameworks/net_3.5.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.5/RedistList/FrameworkList.xml
50         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList
51         $(INSTALL_DATA) frameworks/net_4.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList/FrameworkList.xml
52         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList
53         $(INSTALL_DATA) frameworks/net_4.0_client.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList/FrameworkList.xml
54         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.5.1/RedistList
55         $(INSTALL_DATA) frameworks/net_4.5.1.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.5.1/RedistList/FrameworkList.xml
56
57 install-pcl-targets:
58         $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0
59         $(INSTALL_DATA) targets/Microsoft.Portable.Common.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0/Microsoft.Portable.Common.targets
60         $(INSTALL_DATA) targets/Microsoft.Portable.CSharp_4.0.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0/Microsoft.Portable.CSharp.targets
61         $(INSTALL_DATA) targets/Microsoft.Portable.VisualBasic_4.0.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0/Microsoft.Portable.VisualBasic.targets
62         $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5
63         $(INSTALL_DATA) targets/Microsoft.Portable.Common.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5/Microsoft.Portable.Common.targets
64         $(INSTALL_DATA) targets/Microsoft.Portable.CSharp_4.5.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5/Microsoft.Portable.CSharp.targets
65         $(INSTALL_DATA) targets/Microsoft.Portable.VisualBasic_4.5.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5/Microsoft.Portable.VisualBasic.targets
66         $(INSTALL_DATA) targets/Microsoft.Portable.Core.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/Microsoft.Portable.Core.targets
67         $(INSTALL_DATA) targets/Microsoft.Portable.Core.props $(DESTDIR)$(PORTABLE_TARGETS_DIR)/Microsoft.Portable.Core.props
68
69 install-web-targets:
70         $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v9.0/WebApplications
71         $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v9.0/WebApplications
72         $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v10.0/WebApplications
73         $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v10.0/WebApplications
74         $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v11.0/WebApplications
75         $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v11.0/WebApplications
76
77 EXTRA_DISTFILES = \
78         data/xbuild.rsp \
79         data/xbuild.exe.config.in \
80         data/Microsoft.Build.xsd \
81         data/2.0/Microsoft.Common.tasks \
82         data/3.5/Microsoft.Common.tasks \
83         data/4.0/Microsoft.Common.tasks \
84         data/12.0/Microsoft.Common.tasks \
85         data/14.0/Microsoft.Common.tasks \
86         data/2.0/Microsoft.Common.targets \
87         data/3.5/Microsoft.Common.targets \
88         data/4.0/Microsoft.Common.targets \
89         data/12.0/Microsoft.Common.targets \
90         data/14.0/Microsoft.Common.targets \
91         data/2.0/Microsoft.CSharp.targets \
92         data/3.5/Microsoft.CSharp.targets \
93         data/4.0/Microsoft.CSharp.targets \
94         data/12.0/Microsoft.CSharp.targets \
95         data/14.0/Microsoft.CSharp.targets \
96         data/Microsoft.VisualBasic.targets \
97         data/MSBuild/Microsoft.Build.CommonTypes.xsd \
98         data/MSBuild/Microsoft.Build.Core.xsd \
99         frameworks/net_2.0.xml \
100         frameworks/net_3.0.xml \
101         frameworks/net_3.5.xml \
102         frameworks/net_4.0.xml \
103         frameworks/net_4.0_client.xml \
104         frameworks/net_4.5.xml \
105         frameworks/net_4.5.1.xml \
106         targets/Microsoft.Portable.CSharp_4.0.targets \
107         targets/Microsoft.Portable.CSharp_4.5.targets \
108         targets/Microsoft.Portable.VisualBasic_4.0.targets \
109         targets/Microsoft.Portable.VisualBasic_4.5.targets \
110         targets/Microsoft.Portable.Common.targets \
111         targets/Microsoft.Portable.Core.targets \
112         targets/Microsoft.Portable.Core.props \
113         targets/Microsoft.WebApplication.targets \
114         xbuild.make \
115         xbuild_test.make