3 SUBDIRS := build jay mcs monoresgen 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
8 net_2_0_bootstrap_SUBDIRS := class
9 net_2_0_SUBDIRS := jay gmcs class nunit20 tests errors tools
12 $(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
15 OVERRIDE_TARGET_ALL = yes
17 include build/rules.make
19 all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
21 # Used when OVERRIDE_TARGET_ALL is defined
23 ifndef NO_SIGN_ASSEMBLY
24 $(MAKE) NO_SIGN_ASSEMBLY=yes all.real
28 .PHONY: all-local $(STD_TARGETS:=-local)
29 all-local $(STD_TARGETS:=-local):
32 # fun specialty targets
34 PROFILES = default net_2_0
36 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
37 all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
41 $(MAKE) $(PROFILES:%=profile-do--%--$*)
43 # The % below looks like profile-name--target-name
45 $(MAKE) PROFILE=$(subst --, ,$*)
47 profiles-do--run-test:
49 $(MAKE) PROFILE=default run-test || ret=false; \
50 $(MAKE) PROFILE=net_2_0 run-test && $$ret
52 # Orchestrate the bootstrap here.
53 profiles-do--all: profile-do--net_2_0--all
56 profile-do--net_2_0--all: profile-do--net_2_0_bootstrap--all
57 profile-do--net_2_0_bootstrap--all: profile-do--default--all
59 ifeq (linux, $(PLATFORM))
60 profile-do--default--all: profile-do--net_1_1_bootstrap--all
61 profile-do--net_1_1_bootstrap--all: profile-do--basic--all
65 @cd class/corlib && $(MAKE) test run-test
68 $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
70 test-installed-compiler:
71 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=default TEST_RUNTIME=mono MCS=mcs run-test
72 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_2_0 TEST_RUNTIME=mono MCS=gmcs run-test
74 package := mcs-$(VERSION)
90 ScalableMonoIcon.svg \
93 dist-local: dist-default
99 dist-tarball: dist-pre
100 $(MAKE) distdir='$(package)' dist-recursive
101 tar cvzf $(package).tar.gz $(package)
106 # the egrep -v is kind of a hack (to get rid of the makefrags)
107 # but otherwise we have to make dist then make clean which
108 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
110 # We need to set prefix on make so class/System/Makefile can find
111 # the installed System.Xml to build properly
113 distcheck: dist-tarball
114 rm -rf InstallTest Distcheck-MCS ; \
115 mkdir InstallTest ; \
116 destdir=`cd InstallTest && pwd` ; \
117 mv $(package) Distcheck-MCS ; \
118 (cd Distcheck-MCS && \
119 $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
120 $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
121 mv Distcheck-MCS $(package) ; \
122 tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
123 rm $(package)/$(package).tar.gz ; \
124 tar tzf $(package).tar.gz |sed -e 's,/$$,,' |sort >before.list ; \
125 find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
126 cmp before.list after.list || exit 1 ; \
127 cmp before.list distdist.list || exit 1 ; \
128 rm -f before.list after.list distdist.list ; \
129 rm -rf $(package) InstallTest
132 chargedir=monocharge-`date -u +%Y%m%d` ; \
133 mkdir "$$chargedir" ; \
134 DESTDIR=`cd "$$chargedir" && pwd` ; \
135 $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
136 tar cvzf "$$chargedir".tgz "$$chargedir" ; \
139 # A bare-bones monocharge.
142 chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
143 mkdir "$$chargedir" ; \
144 DESTDIR=`cd "$$chargedir" && pwd` ; \
145 $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
146 $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
147 $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
148 $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
149 $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
150 tar cvzf "$$chargedir".tgz "$$chargedir" ; \