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