2004-08-27 Martin Baulig <martin@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 --wlevel 4
10
11 GMCS_COMPILE = $(RUNTIME) ../gmcs/gmcs.exe $(LOCAL_MCS_FLAGS)
12 GENERICS_COMPILE = $(RUNTIME) ../gmcs/gmcs.exe $(LOCAL_MCS_FLAGS) /target:library
13
14 RUNTEST_PL = ./runtest.pl
15
16 DISTFILES = \
17         CONTRIBUTORS_README     \
18         README.tests            \
19         errors.txt              \
20         fail                    \
21         runtest.pl              \
22         $(wildcard *.cs)
23
24 #all-local: run-test-local test-multi-local
25 all-local: CS0618-2-lib.dll CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll \
26 CS3005-16-lib.dll CS3013-module.dll
27
28 test-local:
29
30 # again, run-test is when the tests actually happen, so
31 # don't compile on make test.
32
33 run-test-local: run-mcs-tests run-gmcs-tests run-generics-local
34
35 run-mcs-tests:
36         @ ./do-tests.pl mcs "$(CSCOMPILE)" "cs*.cs"
37
38 run-gmcs-tests:
39         @ ./do-tests.pl gmcs "$(GMCS_COMPILE)" "cs*.cs"
40
41 run-generics-local:
42         @ ./do-tests.pl generics "$(GENERICS_COMPILE)" "gcs*.cs"
43
44 test-multi-local:
45         @ failed=false; \
46         testsuite_log=test-multi.log; rm -f $$testsuite_log ; \
47         for i in error-*.cs; do \
48                 test_out=`echo $$i | sed 's,.cs$$,.out,'` ; \
49                 test_log=`echo $$i | sed 's,.cs$$,.log,'` ; \
50                 echo -n "Running test $$i ... "; \
51                 $(INTERNAL_MCS) $$i > $$test_out 2>&1 || : ; \
52                 if $(RUNTEST_PL) $$i $$test_out > $$test_log 2>&1 ; \
53                 then echo OK; rm -f $$test_out $$test_log ; \
54                      echo "PASS: $$i" >> $$testsuite_log ; \
55                 else echo FAILED; \
56                      echo "FAIL: $$i" >> $$testsuite_log ; \
57                      flist="$$flist $$i"; \
58                      failed=true; \
59                 fi; \
60         done; \
61         if $$failed; then \
62                 echo "The following tests failed: $$flist"; \
63                 exit 1; \
64         else \
65                 echo All tests passed; \
66         fi
67
68 clean-local:
69         rm -f *.exe
70         rm -f *.dll
71         rm -f *.log
72
73 dist-local: dist-default
74
75 install-local uninstall-local:
76
77 %-lib.dll: %-lib.cs
78         $(BOOTSTRAP_MCS) /target:library /out:$@ $<
79
80 %-module.dll: %-module.cs
81         $(BOOTSTRAP_MCS) /target:module /out:$@ $<