[xbuild] Add a Microsoft.Portable.CSharp.targets file
[mono.git] / mcs / tools / xbuild / Makefile
1 thisdir = tools/xbuild
2 SUBDIRS = 
3 include ../../build/rules.make
4 HAS_NUNIT_TEST = yes
5
6 BUILD_FRAMEWORK = Microsoft.Build.Framework.dll
7 BUILD_ENGINE = Microsoft.Build.Engine.dll
8 INSTALL_FRAMEWORK_VERSION = $(FRAMEWORK_VERSION)
9
10 ifeq (3.5, $(FRAMEWORK_VERSION))
11 NAME_SUFFIX = .v3.5
12 ASSEMBLY_VERSION = 3.5.0.0
13 BUILD_FRAMEWORK := $(topdir)/class/lib/$(PROFILE)/$(BUILD_FRAMEWORK)
14 BUILD_ENGINE := $(topdir)/class/lib/$(PROFILE)/$(BUILD_ENGINE)
15 else
16 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
17 NAME_SUFFIX = .v4.0
18 ASSEMBLY_VERSION = 4.0.0.0
19 INSTALL_FRAMEWORK_VERSION = 4.0
20 endif
21 endif
22
23 LOCAL_MCS_FLAGS = -r:$(BUILD_FRAMEWORK) -r:Microsoft.Build.Utilities$(NAME_SUFFIX).dll -r:$(BUILD_ENGINE)
24 PROGRAM = xbuild.exe
25
26 include ../../build/executable.make
27
28 CLEAN_FILES= xbuild.exe xbuild.exe.mdb
29
30 XBUILD_DIR=.
31 XBUILD_FRAMEWORKS_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETFramework/
32 REDISTLIST_DIR=$(XBUILD_FRAMEWORKS_DIR)/v$(FRAMEWORK_VERSION)/RedistList
33 include $(XBUILD_DIR)/xbuild_targets.make
34
35 install-local:  install-extras
36
37 WEBAPP_DIR = Microsoft/VisualStudio/v9.0/WebApplications
38 SILVERLIGHT_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Silverlight
39 PORTABLE_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Portable
40 EXTRAS_DIR = $(mono_libdir)/mono/$(INSTALL_FRAMEWORK_VERSION)
41 install-extras: 
42         $(MKINSTALLDIRS) $(DESTDIR)$(EXTRAS_DIR) $(DESTDIR)$(REDISTLIST_DIR) $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v3.0/RedistList $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v4.0/RedistList
43         $(INSTALL_DATA) xbuild/xbuild.rsp $(DESTDIR)$(mono_libdir)/mono/$(FRAMEWORK_VERSION)
44         $(INSTALL_DATA) xbuild/$(FRAMEWORK_VERSION)/Microsoft.Common.tasks $(DESTDIR)$(EXTRAS_DIR)
45         $(INSTALL_DATA) xbuild/Microsoft.Build.xsd $(DESTDIR)$(EXTRAS_DIR)
46         $(INSTALL_DATA) xbuild/$(FRAMEWORK_VERSION)/Microsoft.Common.targets $(DESTDIR)$(EXTRAS_DIR)
47         $(INSTALL_DATA) xbuild/Microsoft.CSharp.targets $(DESTDIR)$(EXTRAS_DIR)
48         $(INSTALL_DATA) xbuild/Microsoft.VisualBasic.targets $(DESTDIR)$(EXTRAS_DIR)
49         $(INSTALL_DATA) xbuild/$(FRAMEWORK_VERSION)/FrameworkList.xml $(DESTDIR)$(REDISTLIST_DIR)
50         $(INSTALL_DATA) xbuild/4.0/FrameworkList.xml $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v4.0/RedistList/FrameworkList.xml
51         $(INSTALL_DATA) xbuild/FrameworkList-3.0.xml $(DESTDIR)$(XBUILD_FRAMEWORKS_DIR)/v3.0/RedistList/FrameworkList.xml
52         $(MKINSTALLDIRS) $(DESTDIR)$(EXTRAS_DIR)/MSBuild
53         $(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.CommonTypes.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild
54         $(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.Core.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild
55         $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild
56         $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)
57         $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)
58         $(MKINSTALLDIRS) $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
59         $(MKINSTALLDIRS) $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
60         $(INSTALL_DATA) xbuild/Microsoft.Silverlight.CSharp.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
61         $(INSTALL_DATA) xbuild/Microsoft.Silverlight.CSharp.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
62         $(INSTALL_DATA) xbuild/Microsoft.Silverlight.VisualBasic.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
63         $(INSTALL_DATA) xbuild/Microsoft.Silverlight.VisualBasic.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
64         sed -e 's/@SILVERLIGHT_VERSION@/2.0/g' xbuild/Microsoft.Silverlight.Common.targets > $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0/Microsoft.Silverlight.Common.targets
65         sed -e 's/@SILVERLIGHT_VERSION@/3.0/g' xbuild/Microsoft.Silverlight.Common.targets > $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0/Microsoft.Silverlight.Common.targets
66         $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_DIR)/v4.0
67         $(INSTALL_DATA) xbuild/Microsoft.Portable.CSharp.targets $(DESTDIR)$(PORTABLE_DIR)/v4.0
68
69 EXTRA_DISTFILES = \
70         xbuild/xbuild.rsp \
71         xbuild/2.0/Microsoft.Common.tasks \
72         xbuild/3.5/Microsoft.Common.tasks \
73         xbuild/4.0/Microsoft.Common.tasks \
74         xbuild/4.5/Microsoft.Common.tasks \
75         xbuild/2.0/Microsoft.Common.targets \
76         xbuild/3.5/Microsoft.Common.targets \
77         xbuild/4.0/Microsoft.Common.targets \
78         xbuild/4.5/Microsoft.Common.targets \
79         xbuild/2.0/FrameworkList.xml \
80         xbuild/3.5/FrameworkList.xml \
81         xbuild/4.0/FrameworkList.xml \
82         xbuild/4.5/FrameworkList.xml \
83         xbuild/FrameworkList-3.0.xml \
84         xbuild/Microsoft.Build.xsd \
85         xbuild/Microsoft.CSharp.targets \
86         xbuild/MSBuild/Microsoft.Build.CommonTypes.xsd \
87         xbuild/MSBuild/Microsoft.Build.Core.xsd         \
88         xbuild/Microsoft.VisualBasic.targets \
89         xbuild/Microsoft.WebApplication.targets \
90         xbuild/Microsoft.Silverlight.Common.targets \
91         xbuild/Microsoft.Silverlight.CSharp.targets \
92         xbuild/Microsoft.Silverlight.VisualBasic.targets \
93         xbuild/Microsoft.Portable.CSharp.targets \
94         xbuild_targets.make