2002-05-08 Rodrigo Moya <rodrigo@ximian.com>
[mono.git] / mcs / errors / makefile
1 #
2 # Compile at the maximum warning level to probe for warnings
3 #
4 MCS=../mcs/mcs.exe --wlevel 4
5
6 all:
7         failed=false; \
8         for i in cs*.cs; do \
9                 case $$i in \
10                         cs[0-9]*-[0-9]*cs) \
11                         error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//' -e 's/-.*//'`; \
12                         ;;\
13                         cs[0-9-]*cs)  \
14                         error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//'`; \
15                         ;;\
16                 esac; \
17                 echo $(MCS) --probe $$error $$i; \
18                 $(MCS) --probe $$error 1 $$i > /dev/null; \
19                 code=$$?; \
20                 if test $$code != 123; then \
21                         echo Code is: $$code; \
22                         if [ x$$code = x124 ]; then \
23                                 echo "Compiler failed to flag $$i"; \
24                         else \
25                                 echo "Compiler failed to compile $$i"; \
26                         fi; \
27                         flist="$$flist $$i"; \
28                         failed=true; \
29                 else \
30                         echo test $$i ok; \
31                 fi; \
32         done; \
33         if $$failed; then \
34                 echo "The following tests failed: $$flist"; \
35         else \
36                 echo All tests passed; \
37         fi