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