3 SUBDIRS := build jay mcs tools/resgen class mbas nunit20 ilasm tools tests errors docs
4 DIST_ONLY_SUBDIRS := gmcs
6 basic_SUBDIRS := jay mcs class
7 net_1_1_bootstrap_SUBDIRS := jay mcs class ilasm tools
8 net_2_0_bootstrap_SUBDIRS := class
9 net_2_0_SUBDIRS := jay gmcs class nunit20 tests errors tools
11 # List of test subdirs that should pass 100%
14 class/Commons.Xml.Relaxng \
16 class/Microsoft.JScript \
19 class/System.Configuration.Install \
20 class/System.Runtime.Remoting \
21 class/System.Runtime.Serialization.Formatters.Soap \
22 class/System.Security \
24 class/System.Web.Services \
29 default_centum_tests := $(centum_tests) class/System.XML
31 net_2_0_centum_tests := $(centum_tests)
33 ifdef ONLY_CENTUM_TESTS
34 TEST_SUBDIRS := $($(PROFILE)_centum_tests)
38 $(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
41 include build/rules.make
43 all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
45 .PHONY: all-local $(STD_TARGETS:=-local)
46 all-local $(STD_TARGETS:=-local):
49 # fun specialty targets
51 PROFILES = default net_2_0
53 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
54 all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
58 $(MAKE) $(PROFILES:%=profile-do--%--$*)
60 # The % below looks like profile-name--target-name
62 $(MAKE) PROFILE=$(subst --, ,$*)
64 # We don't want to run the tests in parallel. We want behaviour like -k.
65 profiles-do--run-test:
66 ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret
68 # Orchestrate the bootstrap here.
69 _boot_ = all clean install
70 $(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
71 $(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--default--%
72 $(_boot_:%=profile-do--default--%): profile-do--default--%: profile-do--net_1_1_bootstrap--%
73 ifeq (linux, $(PLATFORM))
74 $(_boot_:%=profile-do--net_1_1_bootstrap--%): profile-do--net_1_1_bootstrap--%: profile-do--basic--%
78 @cd class/corlib && $(MAKE) test run-test
81 $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
83 test-installed-compiler:
84 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=default TEST_RUNTIME=mono MCS=mcs run-test
85 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_2_0 TEST_RUNTIME=mono MCS=gmcs run-test
87 package := mcs-$(VERSION)
103 ScalableMonoIcon.svg \
107 dist-local: dist-default
113 dist-tarball: dist-pre
114 $(MAKE) distdir='$(package)' dist-recursive
115 tar cvzf $(package).tar.gz $(package)
120 # the egrep -v is kind of a hack (to get rid of the makefrags)
121 # but otherwise we have to make dist then make clean which
122 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
124 # We need to set prefix on make so class/System/Makefile can find
125 # the installed System.Xml to build properly
127 distcheck: dist-tarball
128 rm -rf InstallTest Distcheck-MCS ; \
129 mkdir InstallTest ; \
130 destdir=`cd InstallTest && pwd` ; \
131 mv $(package) Distcheck-MCS ; \
132 (cd Distcheck-MCS && \
133 $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
134 $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
135 mv Distcheck-MCS $(package) ; \
136 tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
137 rm $(package)/$(package).tar.gz ; \
138 tar tzf $(package).tar.gz |sed -e 's,/$$,,' |sort >before.list ; \
139 find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
140 cmp before.list after.list || exit 1 ; \
141 cmp before.list distdist.list || exit 1 ; \
142 rm -f before.list after.list distdist.list ; \
143 rm -rf $(package) InstallTest
146 chargedir=monocharge-`date -u +%Y%m%d` ; \
147 mkdir "$$chargedir" ; \
148 DESTDIR=`cd "$$chargedir" && pwd` ; \
149 $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
150 tar cvzf "$$chargedir".tgz "$$chargedir" ; \
153 # A bare-bones monocharge.
156 chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
157 mkdir "$$chargedir" ; \
158 DESTDIR=`cd "$$chargedir" && pwd` ; \
159 $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
160 $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
161 $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
162 $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
163 $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
164 tar cvzf "$$chargedir".tgz "$$chargedir" ; \