Fix bugs in sizing TableLayoutPanel (Xamarin bug 18638)
[mono.git] / mcs / Makefile
1 thisdir := .
2
3 SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
4
5 # Resgen is corlib specific tool
6
7 basic_SUBDIRS := build jay mcs class
8 build_SUBDIRS := build class mcs class/aot-compiler tools
9 net_2_0_SUBDIRS := build class nunit24 ilasm tools tests errors docs
10 monodroid_SUBDIRS := build class
11 monotouch_SUBDIRS := build class
12 monotouch_runtime_SUBDIRS := build class
13 xammac_SUBDIRS := build class
14 mobile_SUBDIRS := build class
15 mobile_static_SUBDIRS := build class
16 net_3_5_SUBDIRS := build class tools/xbuild
17 net_4_0_SUBDIRS := build class
18 net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
19 xbuild_12_SUBDIRS := build class tools/xbuild
20 xbuild_14_SUBDIRS := build class tools/xbuild
21
22 # List of test subdirs that should pass 100%
23 centum_tests := \
24         class/corlib                                            \
25         class/System                                            \
26         class/System.XML                                        \
27         class/Commons.Xml.Relaxng                               \
28         class/Cscompmgd                                         \
29         class/Mono.Posix                                        \
30         class/Mono.Security                                     \
31         class/System.Design                                     \
32         class/System.DirectoryServices          \
33         class/System.Drawing                            \
34         class/System.Runtime.Remoting                           \
35         class/System.Runtime.Serialization.Formatters.Soap      \
36         class/System.Security                                   \
37         class/System.ServiceProcess                             \
38         class/System.Web                                                \
39         class/System.Web.Services                               \
40         tests                                                   \
41         errors
42
43 default_centum_tests := \
44         $(centum_tests)         \
45         class/System.Data
46
47 net_2_0_centum_tests := \
48         $(centum_tests)                         \
49         class/System.Core                       \
50         class/System.Configuration              \
51         class/System.Data.DataSetExtensions     \
52         class/System.Xml.Linq                   \
53         class/System.Transactions               \
54         class/Microsoft.Build.Framework         \
55         class/Microsoft.Build.Utilities         \
56         class/Microsoft.Build.Engine            \
57         class/System.Runtime.Serialization      \
58         class/System.IdentityModel              \
59         class/System.ServiceModel               \
60         class/System.ServiceModel.Web           \
61         class/Mono.C5
62
63 #       class/System.Web.Extensions
64 #       class/Microsoft.Build.Tasks     
65
66 # note that System.Xml.Linq is here to prevent this from being empty
67 net_3_5_centum_tests := \
68         class/System.Xml.Linq
69
70 ifdef ONLY_CENTUM_TESTS
71 TEST_SUBDIRS := $($(PROFILE)_centum_tests)
72 endif
73
74 ifdef TEST_SUBDIRS
75 $(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
76 endif
77
78 include build/rules.make
79
80 all-recursive $(STD_TARGETS:=-recursive): dir-check platform-check profile-check
81
82 .PHONY: all-local $(STD_TARGETS:=-local)
83 all-local $(STD_TARGETS:=-local):
84         @:
85
86 dir-check:
87         @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then $(MAKE) -C ../runtime; fi
88
89 # fun specialty targets
90
91 PROFILES = net_2_0 net_3_5 net_4_0 net_4_5 xbuild_12 xbuild_14
92
93 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
94 all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
95         @:
96
97 profiles-do--%:
98         $(MAKE) $(PROFILES:%=profile-do--%--$*)
99
100 # The % below looks like profile-name--target-name
101 profile-do--%:
102         $(MAKE) PROFILE=$(subst --, ,$*)
103
104 # We don't want to run the tests in parallel.  We want behaviour like -k.
105 profiles-do--run-test:
106         ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret
107
108 # Orchestrate the bootstrap here.
109 _boot_ = all clean install
110 $(_boot_:%=profile-do--xbuild_14--%):         profile-do--xbuild_14--%:         profile-do--net_4_5--%
111 $(_boot_:%=profile-do--xbuild_12--%):         profile-do--xbuild_12--%:         profile-do--net_4_5--%
112 $(_boot_:%=profile-do--net_4_5--%):           profile-do--net_4_5--%:           profile-do--build--%
113 $(_boot_:%=profile-do--net_4_0--%):           profile-do--net_4_0--%:           profile-do--build--%
114 $(_boot_:%=profile-do--net_3_5--%):           profile-do--net_3_5--%:           profile-do--net_2_0--%
115 $(_boot_:%=profile-do--monodroid--%):         profile-do--monodroid--%:         profile-do--build--%
116 $(_boot_:%=profile-do--monotouch--%):         profile-do--monotouch--%:         profile-do--build--%
117 $(_boot_:%=profile-do--monotouch_runtime--%):  profile-do--monotouch_runtime--%:  profile-do--build--%
118 $(_boot_:%=profile-do--xammac--%):            profile-do--xammac--%:            profile-do--build--%
119 $(_boot_:%=profile-do--mobile--%):            profile-do--mobile--%:         profile-do--build--%
120 $(_boot_:%=profile-do--mobile_static--%):     profile-do--mobile_static--%:     profile-do--build--%
121 $(_boot_:%=profile-do--net_2_0--%):           profile-do--net_2_0--%:           profile-do--build--%
122 $(_boot_:%=profile-do--build--%):             profile-do--build--%:             profile-do--basic--%
123
124 testcorlib:
125         @cd class/corlib && $(MAKE) test run-test
126
127 compiler-tests:
128         $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
129
130 package := mcs-$(VERSION)
131
132 DISTFILES = \
133         AUTHORS                 \
134         ChangeLog               \
135         COPYING                 \
136         COPYING.LIB             \
137         INSTALL.txt             \
138         LICENSE                 \
139         LICENSE.GPL             \
140         LICENSE.LGPL            \
141         LICENSE.MPL             \
142         Makefile                \
143         mkinstalldirs           \
144         MIT.X11                 \
145         MonoIcon.png            \
146         README                  \
147         ScalableMonoIcon.svg    \
148         winexe.in
149
150 dist-local: dist-default
151
152 csproj-local:
153
154 dist-pre:
155         rm -rf $(package)
156         mkdir $(package)
157
158 dist-tarball: dist-pre
159         $(MAKE) distdir='$(package)' dist-recursive
160         tar cvjf $(package).tar.bz2 $(package)
161
162 dist: dist-tarball
163         rm -rf $(package)
164
165 # the egrep -v is kind of a hack (to get rid of the makefrags)
166 # but otherwise we have to make dist then make clean which
167 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
168 #
169 # We need to set prefix on make so class/System/Makefile can find
170 # the installed System.Xml to build properly
171
172 distcheck: dist-tarball
173         rm -rf InstallTest Distcheck-MCS ; \
174         mkdir InstallTest ; \
175         destdir=`cd InstallTest && pwd` ; \
176         mv $(package) Distcheck-MCS ; \
177         (cd Distcheck-MCS && \
178             $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
179             $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
180         mv Distcheck-MCS $(package) ; \
181         tar tjf $(package)/$(package).tar.bz2 |sed -e 's,/$$,,' |sort >distdist.list ; \
182         rm $(package)/$(package).tar.bz2 ; \
183         tar tjf $(package).tar.bz2 |sed -e 's,/$$,,' |sort >before.list ; \
184         find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
185         cmp before.list after.list || exit 1 ; \
186         cmp before.list distdist.list || exit 1 ; \
187         rm -f before.list after.list distdist.list ; \
188         rm -rf $(package) InstallTest
189
190 monocharge:
191         chargedir=monocharge-`date -u +%Y%m%d` ; \
192         mkdir "$$chargedir" ; \
193         DESTDIR=`cd "$$chargedir" && pwd` ; \
194         $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
195         tar cvjf "$$chargedir".tar.bz2 "$$chargedir" ; \
196         rm -rf "$$chargedir"
197
198 # A bare-bones monocharge.
199
200 monocharge-lite:
201         chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
202         mkdir "$$chargedir" ; \
203         DESTDIR=`cd "$$chargedir" && pwd` ; \
204         $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
205         $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
206         $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
207         $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
208         $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
209         tar cvjf "$$chargedir".tar.bz2 "$$chargedir" ; \
210         rm -rf "$$chargedir"