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 \
23 class/System.Web.Services \
28 default_centum_tests := $(centum_tests)
30 net_2_0_centum_tests := $(centum_tests)
32 ifdef ONLY_CENTUM_TESTS
33 TEST_SUBDIRS := $($(PROFILE)_centum_tests)
37 $(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
40 include build/rules.make
42 all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
44 .PHONY: all-local $(STD_TARGETS:=-local)
45 all-local $(STD_TARGETS:=-local):
48 # fun specialty targets
50 PROFILES = default net_2_0
52 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
53 all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
57 $(MAKE) $(PROFILES:%=profile-do--%--$*)
59 # The % below looks like profile-name--target-name
61 $(MAKE) PROFILE=$(subst --, ,$*)
63 # We don't want to run the tests in parallel. We want behaviour like -k.
64 profiles-do--run-test:
65 ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret
67 # Orchestrate the bootstrap here.
68 _boot_ = all clean install
69 $(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
70 $(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--default--%
71 $(_boot_:%=profile-do--default--%): profile-do--default--%: profile-do--net_1_1_bootstrap--%
72 ifeq (linux, $(PLATFORM))
73 $(_boot_:%=profile-do--net_1_1_bootstrap--%): profile-do--net_1_1_bootstrap--%: profile-do--basic--%
77 @cd class/corlib && $(MAKE) test run-test
80 $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
82 test-installed-compiler:
83 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=default TEST_RUNTIME=mono MCS=mcs run-test
84 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_2_0 TEST_RUNTIME=mono MCS=gmcs run-test
86 package := mcs-$(VERSION)
102 ScalableMonoIcon.svg \
106 dist-local: dist-default
112 dist-tarball: dist-pre
113 $(MAKE) distdir='$(package)' dist-recursive
114 tar cvzf $(package).tar.gz $(package)
119 # the egrep -v is kind of a hack (to get rid of the makefrags)
120 # but otherwise we have to make dist then make clean which
121 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
123 # We need to set prefix on make so class/System/Makefile can find
124 # the installed System.Xml to build properly
126 distcheck: dist-tarball
127 rm -rf InstallTest Distcheck-MCS ; \
128 mkdir InstallTest ; \
129 destdir=`cd InstallTest && pwd` ; \
130 mv $(package) Distcheck-MCS ; \
131 (cd Distcheck-MCS && \
132 $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
133 $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
134 mv Distcheck-MCS $(package) ; \
135 tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
136 rm $(package)/$(package).tar.gz ; \
137 tar tzf $(package).tar.gz |sed -e 's,/$$,,' |sort >before.list ; \
138 find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
139 cmp before.list after.list || exit 1 ; \
140 cmp before.list distdist.list || exit 1 ; \
141 rm -f before.list after.list distdist.list ; \
142 rm -rf $(package) InstallTest
145 chargedir=monocharge-`date -u +%Y%m%d` ; \
146 mkdir "$$chargedir" ; \
147 DESTDIR=`cd "$$chargedir" && pwd` ; \
148 $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
149 tar cvzf "$$chargedir".tgz "$$chargedir" ; \
152 # A bare-bones monocharge.
155 chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
156 mkdir "$$chargedir" ; \
157 DESTDIR=`cd "$$chargedir" && pwd` ; \
158 $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
159 $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
160 $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
161 $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
162 $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
163 tar cvzf "$$chargedir".tgz "$$chargedir" ; \