Updated project.
[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 #
25 # This is the target which is run by buildbot.
26 #
27 test-everything: run-test-local
28
29 #all-local: run-test-local test-multi-local
30 all-local: CS0571-3-lib.dll CS0618-2-lib.dll \
31         CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll \
32         CS3005-16-lib.dll CS3013-module.dll
33
34 test-local:
35
36 # again, run-test is when the tests actually happen, so
37 # don't compile on make test.
38
39 run-test-local: run-mcs-tests run-gmcs-tests run-generics-tests
40
41 run-mcs-tests:
42         @ ./do-tests.pl mcs "$(CSCOMPILE)" "cs*.cs"
43
44 run-gmcs-tests:
45         @ ./do-tests.pl gmcs "$(GMCS_COMPILE)" "cs*.cs"
46
47 run-generics-tests:
48         @ ./do-tests.pl generics "$(GENERICS_COMPILE)" "gcs*.cs"
49
50 test-multi-local:
51         @ failed=false; \
52         testsuite_log=test-multi.log; rm -f $$testsuite_log ; \
53         for i in error-*.cs; do \
54                 test_out=`echo $$i | sed 's,.cs$$,.out,'` ; \
55                 test_log=`echo $$i | sed 's,.cs$$,.log,'` ; \
56                 echo -n "Running test $$i ... "; \
57                 $(INTERNAL_MCS) $$i > $$test_out 2>&1 || : ; \
58                 if $(RUNTEST_PL) $$i $$test_out > $$test_log 2>&1 ; \
59                 then echo OK; rm -f $$test_out $$test_log ; \
60                      echo "PASS: $$i" >> $$testsuite_log ; \
61                 else echo FAILED; \
62                      echo "FAIL: $$i" >> $$testsuite_log ; \
63                      flist="$$flist $$i"; \
64                      failed=true; \
65                 fi; \
66         done; \
67         if $$failed; then \
68                 echo "The following tests failed: $$flist"; \
69                 exit 1; \
70         else \
71                 echo All tests passed; \
72         fi
73
74 clean-local:
75         rm -f *.exe
76         rm -f *.dll
77         rm -f *.log
78
79 dist-local: dist-default
80
81 install-local uninstall-local:
82
83 %-lib.dll: %-lib.cs
84         $(BOOTSTRAP_MCS) /target:library /out:$@ $<
85
86 %-module.dll: %-module.cs
87         $(BOOTSTRAP_MCS) /target:module /out:$@ $<