Updated.
[mono.git] / mcs / errors / Makefile
1 thisdir = errors
2 SUBDIRS = 
3 include ../build/rules.make
4
5 ifeq (default, $(PROFILE))
6 # force this, we don't case if CSC is broken. This also
7 # means we can use --options, yay.
8
9 MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MCS)
10 endif
11
12 LOCAL_MCS_FLAGS = /nowarn:162 --wlevel 4
13
14 GENERICS_COMPILE = $(CSCOMPILE) /target:library
15
16 RUNTEST_PL = ./runtest.pl
17
18 DISTFILES = \
19         CONTRIBUTORS_README     \
20         README.tests            \
21         errors.txt              \
22         fail                    \
23         runtest.pl              \
24         do-tests.pl             \
25         $(wildcard *.cs)
26
27 #all-local: run-test-local test-multi-local
28 all-local: CS0571-3-lib.dll CS0618-2-lib.dll \
29         CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll \
30         CS3005-16-lib.dll CS3013-module.dll
31
32 test-local:
33
34 # again, run-test is when the tests actually happen, so
35 # don't compile on make test.
36
37 run-test-local: run-mcs-tests 
38
39 TEST_PROFILE=mcs
40
41 ifeq (net_2_0, $(PROFILE))
42 TEST_PROFILE=gmcs
43 run-test-local: run-generics-tests
44 endif
45
46 test-everything:
47         $(MAKE) PROFILE=default run-test
48         $(MAKE) PROFILE=net_2_0 run-test
49
50 run-mcs-tests:
51         -rm -f $(TEST_PROFILE).log
52         @./do-tests.pl $(TEST_PROFILE) "$(CSCOMPILE)" "cs*.cs" 2>&1 | tee $(TEST_PROFILE).log
53         @rm -f $(TEST_PROFILE)*.junk
54
55 run-generics-tests:
56         -rm -f generics.log
57         @ ./do-tests.pl generics "$(GENERICS_COMPILE)" "gcs*.cs" 2>&1 | tee generics.log
58         @rm -f generics*.junk
59
60 test-multi-local:
61         @ failed=false; \
62         testsuite_log=test-multi.log; rm -f $$testsuite_log ; \
63         for i in error-*.cs; do \
64                 test_out=`echo $$i | sed 's,.cs$$,.out,'` ; \
65                 test_log=`echo $$i | sed 's,.cs$$,.log,'` ; \
66                 echo -n "Running test $$i ... "; \
67                 $(CSCOMPILE) $$i > $$test_out 2>&1 || : ; \
68                 if $(RUNTEST_PL) $$i $$test_out > $$test_log 2>&1 ; \
69                 then echo OK; rm -f $$test_out $$test_log ; \
70                      echo "PASS: $$i" >> $$testsuite_log ; \
71                 else echo FAILED; \
72                      echo "FAIL: $$i" >> $$testsuite_log ; \
73                      flist="$$flist $$i"; \
74                      failed=true; \
75                 fi; \
76         done; \
77         if $$failed; then \
78                 echo "The following tests failed: $$flist"; \
79                 exit 1; \
80         else \
81                 echo All tests passed; \
82         fi
83
84 clean-local:
85         rm -f *.exe
86         rm -f *.dll
87         rm -f *.log
88         rm -f *.mdb
89         rm -f dummy.xml
90
91 dist-local: dist-default
92
93 install-local uninstall-local:
94
95 %-lib.dll: %-lib.cs
96         $(BOOTSTRAP_MCS) /target:library /out:$@ $<
97
98 %-module.dll: %-module.cs
99         $(BOOTSTRAP_MCS) /target:module /out:$@ $<