updated the demo application
[mono.git] / mcs / makefile.gnu
1 DIRS=jay mcs class mbas nunit20 monoresgen ilasm tools
2 DIST=monocharge-`date -u +%Y%m%d`
3 MCS = mcs
4 INSTALL=/usr/bin/install
5 DOCFILES= README.building
6
7 #nant doesn't work yet
8
9 default: all
10
11 all:
12         if ! which $(MCS); then \
13                 echo You must have a C\# compiler installed to continue.; \
14                 echo This is typically provided by \'mono\'.; \
15                 echo Read INSTALL.txt for details.; \
16                 exit 1; \
17         fi;
18         for i in $(DIRS) ; do \
19                 (cd $$i && $(MAKE) -f makefile.gnu $@ && cd ..) || exit 1; \
20         done
21
22 install:
23         if test x$$prefix = x; then \
24                 echo Usage is: make -f makefile.gnu install prefix=YOURPREFIX; \
25                 exit 1; \
26         fi;
27         for i in $(DIRS) ; do \
28                 (cd $$i && $(MAKE) -f makefile.gnu $@ && cd ..) || exit 1; \
29         done
30         mkdir -p $(prefix)/share/doc/mono
31         $(INSTALL) -m 644 $(DOCFILES) $(prefix)/share/doc/mono
32
33
34 test: all
35         for i in $(DIRS) ; do \
36                 (cd $$i && $(MAKE) -f makefile.gnu $@ && cd ..) || exit 1; \
37         done
38
39 testcorlib:
40         cd class/corlib/Test && $(MAKE) -f makefile.gnu test
41
42 clean:
43         -rm -f monocharge-*.tar.gz
44         for i in $(DIRS) ; do \
45                 (cd $$i && $(MAKE) -f makefile.gnu $@ && cd ..) || exit 1; \
46         done
47
48 corlib:
49         cd class/corlib && $(MAKE) -f makefile.gnu
50
51 # Please do only use `binary-snapshot', the `dist' target will disappear really soon !
52 binary-snapshot: dist
53
54 dist: all
55         mkdir $(DIST)
56         for i in $(DIRS) ; do \
57                 (cd $$i && $(MAKE) -f makefile.gnu install \
58                         prefix=$(PWD)/$(DIST) && cd ..) || exit 1; \
59         done
60         tar -c $(DIST) | gzip > $(DIST).tar.gz
61         rm -rf $(DIST)
62