4538db624720f7fbbf0197c0f3f2034f6c9b7acd
[mono.git] / mcs / errors / Makefile
1 thisdir = errors
2 SUBDIRS = 
3 include ../build/rules.make
4
5 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
6 with_mono_path_n11b = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
7
8 ifeq (default, $(PROFILE))
9 # force this, we don't case if CSC is broken. This also
10 # means we can use --options, yay.
11
12 MCS = $(with_mono_path) $(INTERNAL_MCS)
13 endif
14
15 ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe
16 ILASM = $(with_mono_path_n11b) $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
17
18 GENERICS_COMPILE = $(CSCOMPILE) /target:library
19
20 DISTFILES = \
21         CONTRIBUTORS_README     \
22         errors.txt              \
23         do-tests.pl             \
24         $(wildcard *.cs)        \
25         $(wildcard *.il)        \
26         $(wildcard *.inc)       \
27         $(wildcard *.pub)       \
28         $(wildcard *.response)  \
29         $(wildcard known-issues-*)
30
31 TEST_SUPPORT_FILES = \
32         CS0118-2-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0433-lib.dll CS0433-2-lib.dll \
33         CS0534-3-lib.dll CS0534-4-lib.dll CS0571-3-lib.dll \
34         CS0612-2-lib.dll CS0618-2-lib.dll CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll CS0619-42-lib.dll \
35         CS0619-43-lib.dll CS1546-lib.dll CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll
36
37 all-local:
38
39 test-local: $(TEST_SUPPORT_FILES)
40
41 run-test-ondotnet-local:
42
43 # again, run-test is when the tests actually happen, so
44 # don't compile on make test.
45
46 run-test-local: run-mcs-tests 
47
48 test-everything:
49         $(MAKE) PROFILE=default run-test
50         $(MAKE) PROFILE=net_2_0 run-test
51
52 ifeq (net_2_0, $(PROFILE))
53 COMPILER_NAME = gmcs
54 COMPILER = $(topdir)/gmcs/gmcs.exe
55 TEST_PATTERN = '*cs*.cs'
56 else
57 COMPILER_NAME = mcs
58 COMPILER = $(topdir)/class/lib/$(PROFILE)/mcs.exe
59 TEST_PATTERN = 'cs*.cs'
60 endif
61
62 run-mcs-tests: $(TEST_SUPPORT_FILES)
63
64 run-mcs-tests:
65         MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe negative $(TEST_PATTERN) $(COMPILER) known-issues-$(COMPILER_NAME) $(COMPILER_NAME).log
66
67 clean-local:
68         rm -f *.exe *.dll *.log *.mdb dummy.xml *.junk
69
70 dist-local: dist-default
71
72 install-local uninstall-local:
73
74 %-lib.dll: %-lib.cs
75         $(CSCOMPILE) /target:library /out:$@ $<
76
77 %-module.dll: %-module.cs
78         $(CSCOMPILE) /target:module /out:$@ $<
79
80 %-lib.dll: %-lib.il
81         $(ILASM) /dll /out:$@ $<