Merge pull request #819 from brendanzagaeski/patch-1
[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)/v3.0/RedistList
45         $(INSTALL_DATA) frameworks/net_3.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.0/RedistList/FrameworkList.xml
46         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList
47         $(INSTALL_DATA) frameworks/net_4.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList/FrameworkList.xml
48         $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList
49         $(INSTALL_DATA) frameworks/net_4.0_client.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList/FrameworkList.xml
50
51 install-pcl-targets:
52         $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0
53         $(INSTALL_DATA) targets/Microsoft.Portable.CSharp_4.0.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0/Microsoft.Portable.CSharp.targets
54         $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5
55         $(INSTALL_DATA) targets/Microsoft.Portable.CSharp_4.5.targets $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.5/Microsoft.Portable.CSharp.targets
56
57 install-web-targets:
58         $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v9.0/WebApplications
59         $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v9.0/WebApplications
60         $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v10.0/WebApplications
61         $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v10.0/WebApplications
62         $(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/v11.0/WebApplications
63         $(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/v11.0/WebApplications
64
65 EXTRA_DISTFILES = \
66         data/xbuild.rsp \
67         data/xbuild.exe.config.in \
68         data/Microsoft.Build.xsd \
69         data/2.0/Microsoft.Common.tasks \
70         data/3.5/Microsoft.Common.tasks \
71         data/4.0/Microsoft.Common.tasks \
72         data/12.0/Microsoft.Common.tasks \
73         data/2.0/Microsoft.Common.targets \
74         data/3.5/Microsoft.Common.targets \
75         data/4.0/Microsoft.Common.targets \
76         data/12.0/Microsoft.Common.targets \
77         data/2.0/Microsoft.CSharp.targets \
78         data/3.5/Microsoft.CSharp.targets \
79         data/4.0/Microsoft.CSharp.targets \
80         data/12.0/Microsoft.CSharp.targets \
81         data/Microsoft.VisualBasic.targets \
82         data/MSBuild/Microsoft.Build.CommonTypes.xsd \
83         data/MSBuild/Microsoft.Build.Core.xsd \
84         frameworks/net_2.0.xml \
85         frameworks/net_3.0.xml \
86         frameworks/net_3.5.xml \
87         frameworks/net_4.0.xml \
88         frameworks/net_4.0_client.xml \
89         frameworks/net_4.5.xml \
90         targets/Microsoft.Portable.CSharp_4.0.targets \
91         targets/Microsoft.Portable.CSharp_4.5.targets \
92         targets/Microsoft.WebApplication.targets \
93         xbuild.make \
94         xbuild_test.make