2003-02-05 Alan Tam <Tam@suiLung.com>
[mono.git] / mcs / errors / makefile
1 #
2 # Compile at the maximum warning level to probe for warnings
3 #
4 MCS=mono ../mcs/mcs.exe --wlevel 4 # for linux
5 #MCS=../mcs/mcs.exe --wlevel 4 # for windows
6
7
8 all:
9         @ failed=false; \
10         for i in cs*.cs; do \
11                 case $$i in \
12                         cs[0-9]*-[0-9]*cs) \
13                         error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//' -e 's/-.*//'`; \
14                         ;;\
15                         cs[0-9-]*cs)  \
16                         error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//'`; \
17                         ;;\
18                 esac; \
19                 echo -n "Running test $$i ... "; \
20                 if $(MCS) --unsafe --expect-error $$error $$i > /dev/null; \
21                 then echo OK; \
22                 else echo FAILED; \
23                      flist="$$flist $$i"; \
24                      failed=true; \
25                 fi; \
26         done; \
27         if $$failed; then \
28                 echo "The following tests failed: $$flist"; \
29         else \
30                 echo All tests passed; \
31         fi
32
33 test-error-mono:
34         @ failed=false; \
35         for i in error-*.cs; do \
36                 echo -n "Running test $$i ... "; \
37                 if MCS='$(MCS)' perl ./runtest.pl $$i > /dev/null; \
38                 then echo OK; \
39                 else echo FAILED; \
40                      flist="$$flist $$i"; \
41                      failed=true; \
42                 fi; \
43         done; \
44         if $$failed; then \
45                 echo "The following tests failed: $$flist"; \
46         else \
47                 echo All tests passed; \
48         fi