signature fix
[mono.git] / mcs / Makefile
1 thisdir := .
2
3 SUBDIRS := build jay mcs monoresgen class mbas nunit20 ilasm tools tests errors docs
4 DIST_ONLY_SUBDIRS := gmcs
5
6 net_2_0_bootstrap_SUBDIRS := class
7 net_2_0_SUBDIRS := gmcs class tests errors tools
8
9 ifdef TEST_SUBDIRS
10 $(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
11 endif
12
13 ifndef NO_SIGN_ASSEMBLIES
14 OVERRIDE_TARGET_ALL = yes
15 endif
16
17 include build/rules.make
18
19 all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
20
21 # Used only if OVERRIDE_TARGET_ALL is defined
22 all.override:
23         $(MAKE) NO_SIGN_ASSEMBLY=yes all.real
24         $(MAKE) all.real
25
26 .PHONY: all-local $(STD_TARGETS:=-local)
27 all-local $(STD_TARGETS:=-local):
28         @:
29
30 # fun specialty targets
31
32 PROFILES = default net_2_0
33
34 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
35 all-profiles $(STD_TARGETS:=-profiles):
36         $(MAKE) $(PROFILES:%=profile-do--%--$(@:-profiles=))
37
38 # The % below looks like profile-name--target-name
39 profile-do--%:
40         $(MAKE) PROFILE=$(subst --, ,$*)
41
42 # Ensure these don't run in parallel, for now.
43 profile-do--net_2_0--run-test: profile-do--default--run-test
44
45 profile-do--net_2_0--all: profile-do--net_2_0_bootstrap--all
46 profile-do--net_2_0_bootstrap--all: profile-do--default--all
47
48 testcorlib:
49         @cd class/corlib && $(MAKE) test run-test
50
51 compiler-tests:
52         $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
53
54 test-installed-compiler:
55         $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=default TEST_RUNTIME=mono MCS=mcs run-test
56         $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_2_0 TEST_RUNTIME=mono MCS=gmcs run-test
57
58 package := mcs-$(VERSION)
59
60 DISTFILES = \
61         AUTHORS                 \
62         ChangeLog               \
63         COPYING                 \
64         COPYING.LIB             \
65         INSTALL.txt             \
66         LICENSE                 \
67         LICENSE.GPL             \
68         LICENSE.LGPL            \
69         Makefile                \
70         mkinstalldirs           \
71         MIT.X11                 \
72         MonoIcon.png            \
73         README                  \
74         ScalableMonoIcon.svg    \
75         winexe.in
76
77 dist-local: dist-default
78
79 dist-pre:
80         rm -rf $(package)
81         mkdir $(package)
82
83 dist-tarball: dist-pre
84         $(MAKE) distdir='$(package)' dist-recursive
85         tar cvzf $(package).tar.gz $(package)
86
87 dist: dist-tarball
88         rm -rf $(package)
89
90 # the egrep -v is kind of a hack (to get rid of the makefrags)
91 # but otherwise we have to make dist then make clean which
92 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
93 #
94 # We need to set prefix on make so class/System/Makefile can find
95 # the installed System.Xml to build properly
96
97 distcheck: dist-tarball
98         rm -rf InstallTest Distcheck-MCS ; \
99         mkdir InstallTest ; \
100         destdir=`cd InstallTest && pwd` ; \
101         mv $(package) Distcheck-MCS ; \
102         (cd Distcheck-MCS && \
103             $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
104             $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
105         mv Distcheck-MCS $(package) ; \
106         tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
107         rm $(package)/$(package).tar.gz ; \
108         tar tzf $(package).tar.gz |sed -e 's,/$$,,' |sort >before.list ; \
109         find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
110         cmp before.list after.list || exit 1 ; \
111         cmp before.list distdist.list || exit 1 ; \
112         rm -f before.list after.list distdist.list ; \
113         rm -rf $(package) InstallTest
114
115 monocharge:
116         chargedir=monocharge-`date -u +%Y%m%d` ; \
117         mkdir "$$chargedir" ; \
118         DESTDIR=`cd "$$chargedir" && pwd` ; \
119         $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
120         tar cvzf "$$chargedir".tgz "$$chargedir" ; \
121         rm -rf "$$chargedir"
122
123 # A bare-bones monocharge.
124
125 monocharge-lite:
126         chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
127         mkdir "$$chargedir" ; \
128         DESTDIR=`cd "$$chargedir" && pwd` ; \
129         $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
130         $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
131         $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
132         $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
133         $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
134         tar cvzf "$$chargedir".tgz "$$chargedir" ; \
135         rm -rf "$$chargedir"