2003-07-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / errors / Makefile
1 thisdir = errors
2 SUBDIRS = 
3 include ../build/rules.make
4
5 # force this, we don't case if CSC is broken. This also
6 # means we can use --options, yay.
7
8 MCS = $(INTERNAL_MCS)
9 LOCAL_MCS_FLAGS = /nowarn:162 /unsafe --wlevel 4
10
11 DISTFILES = \
12         CONTRIBUTORS_README     \
13         README.tests            \
14         errors.txt              \
15         fail                    \
16         runtest.pl              \
17         $(wildcard *.cs)
18
19 all-local install-local test-local:
20
21 # again, run-test is when the tests actually happen, so
22 # don't compile on make test.
23
24 run-test-local:
25         @ failed=false; \
26         for i in cs*.cs; do \
27                 case $$i in \
28                         cs[0-9]*-[0-9]*cs) \
29                         error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//' -e 's/-.*//'`; \
30                         ;;\
31                         cs[0-9-]*cs)  \
32                         error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//'`; \
33                         ;;\
34                 esac; \
35                 echo -n "Running test $$i ... "; \
36                 if $(CSCOMPILE) --expect-error $$error $$i > /dev/null; \
37                 then echo OK; \
38                 else echo FAILED; \
39                      flist="$$flist $$i"; \
40                      failed=true; \
41                 fi; \
42         done; \
43         if $$failed; then \
44                 echo "The following tests failed: $$flist"; \
45         else \
46                 echo All tests passed; \
47         fi
48
49 clean-local:
50         rm -f *.exe
51
52 dist-local: dist-default