Actually add the file this time :-)
[mono.git] / mcs / tests / makefile
1 MCS=../mcs/mcs
2 CSC=csc
3
4 TEST_SOURCES = \
5         test-1 test-2 test-3 test-4 test-6 test-7 test-8 test-9 test-10 \
6         test-11 test-12 test-13 test-16 test-17 test-18 test-20 test-21
7
8 TEST_NOPASS = \
9         test-5
10
11 test-compiler:
12         -rm *.exe
13         for i in $(TEST_SOURCES); do \
14                 if $(MCS) $$i.cs > /dev/null; then \
15                         if ./$$i.exe; then \
16                                 echo $$i: ok; \
17                         else \
18                                 echo failed; exit; \
19                         fi; \
20                 else \
21                         echo compiler failed on $$i;   exit; \
22                 fi \
23         done
24
25 casts.cs: gen-cast-test.cs
26         $(CSC) /out:csc-cast.exe gen-cast-test.cs
27         ./csc-cast > casts.cs
28
29 casts-csc.exe: casts.cs
30         $(CSC) /out:casts-csc.exe casts.cs
31
32 casts.exe: casts.cs
33         $(MCS) casts.cs
34
35 csc-casts.out: casts-csc.exe
36         ./casts-csc.exe > csc-casts.out
37
38 msc-casts.out: casts.exe
39         ./casts.exe > msc-casts.out
40
41 test-casts: csc-casts.out msc-casts.out
42         cmp csc-casts.out msc-casts.out
43
44 clean:
45         rm *.exe
46         rm *.out
47         rm casts.cs
48