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