Add an old basic implementation I had around
[mono-project.git] / mcs / Makefile
blobfe677dd1e2110a3b8a32c0e87f7df1e46403dd73
1 thisdir := .
3 SUBDIRS := build jay mcs class nunit20 ilasm tools tests errors docs
4 DIST_ONLY_SUBDIRS := gmcs
6 basic_SUBDIRS := build jay mcs class
7 net_1_1_bootstrap_SUBDIRS := build jay mcs class ilasm tools
8 net_2_0_bootstrap_SUBDIRS := build class ilasm tools
9 net_2_0_SUBDIRS := build jay gmcs class nunit20 ilasm tests errors tools
11 # List of test subdirs that should pass 100%
12 centum_tests := \
13 class/corlib \
14 class/System \
15 class/Commons.Xml.Relaxng \
16 class/Cscompmgd \
17 class/Microsoft.JScript \
18 class/Mono.Posix \
19 class/Mono.Security \
20 class/System.Messaging \
21 class/System.Runtime.Remoting \
22 class/System.Runtime.Serialization.Formatters.Soap \
23 class/System.Security \
24 class/System.ServiceProcess \
25 class/System.Web.Services \
26 tests \
27 errors
29 default_centum_tests := \
30 $(centum_tests) \
31 class/System.XML \
32 class/System.Data
34 net_2_0_centum_tests := $(centum_tests) #class/Mono.C5
36 ifdef ONLY_CENTUM_TESTS
37 TEST_SUBDIRS := $($(PROFILE)_centum_tests)
38 endif
40 ifdef TEST_SUBDIRS
41 $(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
42 endif
44 include build/rules.make
46 all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
48 .PHONY: all-local $(STD_TARGETS:=-local)
49 all-local $(STD_TARGETS:=-local):
52 # fun specialty targets
54 PROFILES = default net_2_0
56 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
57 all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
60 profiles-do--%:
61 $(MAKE) $(PROFILES:%=profile-do--%--$*)
63 # The % below looks like profile-name--target-name
64 profile-do--%:
65 $(MAKE) PROFILE=$(subst --, ,$*)
67 # We don't want to run the tests in parallel. We want behaviour like -k.
68 profiles-do--run-test:
69 ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret
71 # Orchestrate the bootstrap here.
72 _boot_ = all clean install
73 $(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
74 $(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--default--%
75 $(_boot_:%=profile-do--default--%): profile-do--default--%: profile-do--net_1_1_bootstrap--%
76 $(_boot_:%=profile-do--net_1_1_bootstrap--%): profile-do--net_1_1_bootstrap--%: profile-do--basic--%
78 testcorlib:
79 @cd class/corlib && $(MAKE) test run-test
81 compiler-tests:
82 $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
84 test-installed-compiler:
85 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=default TEST_RUNTIME=mono MCS=mcs run-test
86 $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_2_0 TEST_RUNTIME=mono MCS=gmcs run-test
88 package := mcs-$(VERSION)
90 DISTFILES = \
91 AUTHORS \
92 ChangeLog \
93 COPYING \
94 COPYING.LIB \
95 INSTALL.txt \
96 LICENSE \
97 LICENSE.GPL \
98 LICENSE.LGPL \
99 LICENSE.MPL \
100 Makefile \
101 mkinstalldirs \
102 MIT.X11 \
103 MonoIcon.png \
104 README \
105 ScalableMonoIcon.svg \
106 winexe.in \
107 nunit.key
109 dist-local: dist-default
111 dist-pre:
112 rm -rf $(package)
113 mkdir $(package)
115 dist-tarball: dist-pre
116 $(MAKE) distdir='$(package)' dist-recursive
117 tar cvzf $(package).tar.gz $(package)
119 dist: dist-tarball
120 rm -rf $(package)
122 # the egrep -v is kind of a hack (to get rid of the makefrags)
123 # but otherwise we have to make dist then make clean which
124 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
126 # We need to set prefix on make so class/System/Makefile can find
127 # the installed System.Xml to build properly
129 distcheck: dist-tarball
130 rm -rf InstallTest Distcheck-MCS ; \
131 mkdir InstallTest ; \
132 destdir=`cd InstallTest && pwd` ; \
133 mv $(package) Distcheck-MCS ; \
134 (cd Distcheck-MCS && \
135 $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
136 $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
137 mv Distcheck-MCS $(package) ; \
138 tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
139 rm $(package)/$(package).tar.gz ; \
140 tar tzf $(package).tar.gz |sed -e 's,/$$,,' |sort >before.list ; \
141 find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
142 cmp before.list after.list || exit 1 ; \
143 cmp before.list distdist.list || exit 1 ; \
144 rm -f before.list after.list distdist.list ; \
145 rm -rf $(package) InstallTest
147 monocharge:
148 chargedir=monocharge-`date -u +%Y%m%d` ; \
149 mkdir "$$chargedir" ; \
150 DESTDIR=`cd "$$chargedir" && pwd` ; \
151 $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
152 tar cvzf "$$chargedir".tgz "$$chargedir" ; \
153 rm -rf "$$chargedir"
155 # A bare-bones monocharge.
157 monocharge-lite:
158 chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
159 mkdir "$$chargedir" ; \
160 DESTDIR=`cd "$$chargedir" && pwd` ; \
161 $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
162 $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
163 $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
164 $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
165 $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
166 tar cvzf "$$chargedir".tgz "$$chargedir" ; \
167 rm -rf "$$chargedir"