Patch from Juraj Skripsky <js@hotfeet.ch> that improves the conformance of
[mono.git] / mcs / Makefile
1 thisdir := .
2 SUBDIRS := build jay mcs class mbas nunit20 monoresgen ilasm tools tests errors docs
3 OVERRIDE_BARE_TARGETS = hells yeah
4 include build/rules.make
5
6 # Define these ourselves to that the platform checks come first
7
8 all: platform-check profile-check all-recursive #all-local
9
10 install: platform-check profile-check install-recursive #install-local
11
12 uninstall: platform-check profile-check uninstall-recursive #uninstall-local
13
14 test: platform-check profile-check test-recursive #test-local
15
16 run-test: run-test-recursive #run-test-local
17
18 clean: clean-recursive #clean-local
19
20 # fun specialty targets
21
22 testcorlib:
23         @cd class/corlib && $(MAKE) test run-test
24
25 # Disting. We need to override $(distdir) here.
26
27 package := mcs-$(VERSION)
28 top_distdir = $(dots)/$(package)
29 distdir = $(top_distdir)
30 export package
31
32 DISTFILES = \
33         AUTHORS                 \
34         ChangeLog               \
35         COPYING                 \
36         COPYING.LIB             \
37         INSTALL.txt             \
38         LICENSE                 \
39         LICENSE.GPL             \
40         LICENSE.LGPL            \
41         Makefile                \
42         mkinstalldirs           \
43         MIT.X11                 \
44         MonoIcon.png            \
45         README                  \
46         ScalableMonoIcon.svg    \
47         winexe.in
48
49 dist-pre:
50         rm -rf $(package)
51
52 dist-post:
53         tar cvzf $(package).tar.gz $(package)
54
55 dist-local: dist-default
56
57 dist-tarball: dist-pre dist-recursive dist-post
58
59 dist: dist-tarball
60         rm -rf $(package)
61
62 # the egrep -v is kind of a hack (to get rid of the makefrags)
63 # but otherwise we have to make dist then make clean which
64 # is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
65 #
66 # We need to set prefix on make so class/System/Makefile can find
67 # the installed System.Xml to build properly
68
69 distcheck:
70         rm -rf InstallTest Distcheck-MCS ; \
71         mkdir InstallTest ; \
72         destdir=`cd InstallTest && pwd` ; \
73         $(MAKE) dist-tarball || exit 1 ; \
74         mv $(package) Distcheck-MCS ; \
75         (cd Distcheck-MCS && \
76             $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
77             $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
78         mv Distcheck-MCS $(package) ; \
79         tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
80         rm $(package)/$(package).tar.gz ; \
81         tar tzf $(package).tar.gz |sed -e 's,/$$,,' |sort >before.list ; \
82         find $(package) |egrep -v '(makefrag|response)' |sed -e 's,/$$,,' |sort >after.list ; \
83         cmp before.list after.list || exit 1 ; \
84         cmp before.list distdist.list || exit 1 ; \
85         rm -f before.list after.list distdist.list ; \
86         rm -rf $(package) InstallTest
87
88 monocharge:
89         chargedir=monocharge-`date -u +%Y%m%d` ; \
90         mkdir "$$chargedir" ; \
91         DESTDIR=`cd "$$chargedir" && pwd` ; \
92         $(MAKE) install DESTDIR="$$DESTDIR" || exit 1 ; \
93         tar cvzf "$$chargedir".tgz "$$chargedir" ; \
94         rm -rf "$$chargedir"
95
96 # A bare-bones monocharge.
97
98 monocharge-lite:
99         chargedir=monocharge-lite-`date -u +%Y%m%d` ; \
100         mkdir "$$chargedir" ; \
101         DESTDIR=`cd "$$chargedir" && pwd` ; \
102         $(MAKE) -C mcs install DESTDIR="$$DESTDIR" || exit 1; \
103         $(MAKE) -C class/corlib install DESTDIR="$$DESTDIR" || exit 1; \
104         $(MAKE) -C class/System install DESTDIR="$$DESTDIR" || exit 1; \
105         $(MAKE) -C class/System.XML install DESTDIR="$$DESTDIR" || exit 1; \
106         $(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
107         tar cvzf "$$chargedir".tgz "$$chargedir" ; \
108         rm -rf "$$chargedir"