fix 1.1 build
[mcs.git] / Makefile
blob6b176b720fa995eea81e1245d007e968ee40a7c9
1 thisdir := .
3 SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
5 basic_SUBDIRS := build jay mcs class
6 net_1_1_bootstrap_SUBDIRS := build jay mcs class ilasm tools
7 net_2_0_bootstrap_SUBDIRS := build jay mcs class ilasm tools
8 net_2_0_SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
9 net_2_1_bootstrap_SUBDIRS := build mcs class
10 net_2_1_raw_SUBDIRS := build mcs class tools
11 net_2_1_SUBDIRS := tools tests errors
12 net_3_5_SUBDIRS := build class
14 # List of test subdirs that should pass 100%
15 centum_tests := \
16 class/corlib \
17 class/System \
18 class/System.XML \
19 class/Commons.Xml.Relaxng \
20 class/Cscompmgd \
21 class/Microsoft.JScript \
22 class/Mono.Posix \
23 class/Mono.Security \
24 class/System.Design \
25 class/System.DirectoryServices \
26 class/System.Drawing \
27 class/System.Runtime.Remoting \
28 class/System.Runtime.Serialization.Formatters.Soap \
29 class/System.Security \
30 class/System.ServiceProcess \
31 class/System.Web \
32 class/System.Web.Services \
33 tests \
34 errors
36 default_centum_tests := \
37 $(centum_tests) \
38 class/System.Data
40 net_2_0_centum_tests := \
41 $(centum_tests) \
42 class/System.Core \
43 class/System.Configuration \
44 class/System.Data.DataSetExtensions \
45 class/System.Xml.Linq \
46 class/System.Transactions \
47 class/Microsoft.Build.Framework \
48 class/Microsoft.Build.Utilities \
49 class/Microsoft.Build.Engine \
50 class/Mono.C5
52 # class/System.Web.Extensions
53 # class/Microsoft.Build.Tasks
55 # note that System.Xml.Linq is here to prevent this from being empty
56 net_3_5_centum_tests := \
57 class/System.Xml.Linq
59 ifdef ONLY_CENTUM_TESTS
60 TEST_SUBDIRS := $($(PROFILE)_centum_tests)
61 endif
63 ifdef TEST_SUBDIRS
64 $(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
65 endif
67 include build/rules.make
69 all-recursive $(STD_TARGETS:=-recursive): dir-check platform-check profile-check
71 .PHONY: all-local $(STD_TARGETS:=-local)
72 all-local $(STD_TARGETS:=-local):
75 dir-check:
76 @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then echo "Running make from the mcs directory is not supported. Run make from the parent directory (if using a tarball), or from the directory where the runtime is checked out (if using an SVN checkout)."; exit 1; fi
78 # fun specialty targets
80 PROFILES = net_1_1 net_2_0 net_3_5
82 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
83 all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
86 profiles-do--%:
87 $(MAKE) $(PROFILES:%=profile-do--%--$*)
89 # The % below looks like profile-name--target-name
90 profile-do--%:
91 $(MAKE) PROFILE=$(subst --, ,$*)
93 # We don't want to run the tests in parallel. We want behaviour like -k.
94 profiles-do--run-test:
95 ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret
97 # Orchestrate the bootstrap here.
98 _boot_ = all clean install
99 $(_boot_:%=profile-do--net_3_5--%): profile-do--net_3_5--%: profile-do--net_2_0--%
100 $(_boot_:%=profile-do--net_2_1--%): profile-do--net_2_1--%: profile-do--net_2_1_raw--%
101 $(_boot_:%=profile-do--net_2_1_raw--%): profile-do--net_2_1_raw--%: profile-do--net_2_1_bootstrap--%
102 $(_boot_:%=profile-do--net_2_1_bootstrap--%): profile-do--net_2_1_bootstrap--%: profile-do--net_2_0--%
103 $(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
104 $(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--net_1_1--%
105 $(_boot_:%=profile-do--net_1_1--%): profile-do--net_1_1--%: profile-do--net_1_1_bootstrap--%
106 $(_boot_:%=profile-do--net_1_1_bootstrap--%): profile-do--net_1_1_bootstrap--%: profile-do--basic--%
108 testcorlib:
109 @cd class/corlib && $(MAKE) test run-test
111 compiler-tests:
112 $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
114 test-installed-compiler:
115 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_1_1 TEST_RUNTIME=mono MCS=mcs run-test
116 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_2_0 TEST_RUNTIME=mono MCS=gmcs run-test
118 package := mcs-$(VERSION)
120 DISTFILES = \
121 AUTHORS \
122 ChangeLog \
123 COPYING \
124 COPYING.LIB \
125 INSTALL.txt \
126 LICENSE \
127 LICENSE.GPL \
128 LICENSE.LGPL \
129 LICENSE.MPL \
130 Makefile \
131 mkinstalldirs \
132 MIT.X11 \
133 MonoIcon.png \
134 README \
135 ScalableMonoIcon.svg \
136 winexe.in \
137 nunit.key
139 dist-local: dist-default
141 dist-pre:
142 rm -rf $(package)
143 mkdir $(package)
145 dist-tarball: dist-pre
146 $(MAKE) distdir='$(package)' dist-recursive
147 tar cvjf $(package).tar.bz2 $(package)
149 dist: dist-tarball
150 rm -rf $(package)
152 # the egrep -v is kind of a hack (to get rid of the makefrags)
153 # but otherwise we have to make dist then make clean which
154 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
156 # We need to set prefix on make so class/System/Makefile can find
157 # the installed System.Xml to build properly
159 distcheck: dist-tarball
160 rm -rf InstallTest Distcheck-MCS ; \
161 mkdir InstallTest ; \
162 destdir=`cd InstallTest && pwd` ; \
163 mv $(package) Distcheck-MCS ; \
164 (cd Distcheck-MCS && \
165 $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
166 $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
167 mv Distcheck-MCS $(package) ; \
168 tar tjf $(package)/$(package).tar.bz2 |sed -e 's,/$$,,' |sort >distdist.list ; \
169 rm $(package)/$(package).tar.bz2 ; \
170 tar tjf $(package).tar.bz2 |sed -e 's,/$$,,' |sort >before.list ; \
171 find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
172 cmp before.list after.list || exit 1 ; \
173 cmp before.list distdist.list || exit 1 ; \
174 rm -f before.list after.list distdist.list ; \
175 rm -rf $(package) InstallTest
177 monocharge:
178 chargedir=monocharge-`date -u +%Y%m%d` ; \
179 mkdir "$$chargedir" ; \
180 DESTDIR=`cd "$$chargedir" && pwd` ; \
181 $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
182 tar cvjf "$$chargedir".tar.bz2 "$$chargedir" ; \
183 rm -rf "$$chargedir"
185 # A bare-bones monocharge.
187 monocharge-lite:
188 chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
189 mkdir "$$chargedir" ; \
190 DESTDIR=`cd "$$chargedir" && pwd` ; \
191 $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
192 $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
193 $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
194 $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
195 $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
196 tar cvjf "$$chargedir".tar.bz2 "$$chargedir" ; \
197 rm -rf "$$chargedir"