Flush (work in progress)
[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
7 EXTRA_SUPPORT_FILES = CSFriendAssembly-lib.dll GCS0122-2-lib.dll GCS0730-lib.dll GCS0733-lib.dll GCS1685-lib.dll
8
9 ilasm = $(topdir)/class/lib/$(PROFILE)/ilasm.exe
10 ILASM = $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
11
12 DISTFILES = \
13         CONTRIBUTORS_README     \
14         errors.txt              \
15         do-tests.pl             \
16         $(wildcard *.cs)        \
17         $(wildcard *.il)        \
18         $(wildcard *.inc)       \
19         $(wildcard *.pub)       \
20         $(wildcard *.snk)       \
21         $(wildcard *.response)  \
22         $(wildcard known-issues-*)
23
24 TEST_SUPPORT_FILES = \
25         CS0118-2-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0144-3-lib.dll \
26         CS0205-3-lib.dll \
27         CS0229-3-lib.dll CS0229-4-lib.dll \
28         CS0433-lib.dll CS0433-2-lib.dll \
29         CS0534-3-lib.dll CS0534-4-lib.dll CS0571-3-lib.dll CS0571-5-lib.dll CS0571-6-lib.dll \
30         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 \
31         CS0619-43-lib.dll CS1546-lib.dll CS0619-51-lib.dll CS1509-module.dll CS1681-2-lib.dll \
32         CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
33         $(EXTRA_SUPPORT_FILES) 
34
35 # mention all targets
36 all-local $(STD_TARGETS:=-local):
37
38 VALID_PROFILE := $(filter net_2_0 moonlight net_4_0, $(PROFILE))
39 ifdef VALID_PROFILE
40
41 qcheck: run-mcs-tests 
42
43 # again, run-test is when the tests actually happen, so
44 # don't compile on make test.
45
46 test-local:
47         @:
48
49 run-test-local: clean-local
50         $(MAKE) run-mcs-tests
51
52 ifeq (net_4_0, $(PROFILE))
53 COMPILER_NAME = dmcs
54 TEST_PATTERN = 'v4'
55 endif
56 ifeq (moonlight, $(PROFILE))
57 COMPILER_NAME = smcs
58 TEST_PATTERN = 'v2'
59 LOCAL_RUNTIME_FLAGS = --security=temporary-smcs-hack
60 endif
61 ifeq (net_2_0, $(PROFILE))
62 COMPILER_NAME = gmcs
63 TEST_PATTERN = 'v2'
64 endif
65
66 COMPILER = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
67 TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
68
69 # Required to test parser correctly
70 TESTER_OPTIONS +=-compiler-options:-v
71
72 run-mcs-tests: $(TEST_SUPPORT_FILES)
73         $(TESTER) -mode:neg -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TESTER_OPTIONS)
74
75 endif
76
77 clean-local:
78         rm -f *.exe *.dll *.log *.mdb dummy.xml *.junk
79
80 dist-local: dist-default
81
82 csproj-local install-local uninstall-local:
83
84 %-lib.dll: %-lib.cs
85         $(CSCOMPILE) /target:library /out:$@ $<
86
87 %-module.dll: %-module.cs
88         $(CSCOMPILE) /target:module /out:$@ $<
89
90 %-lib.dll: %-lib.il
91         $(ILASM) /dll /out:$@ $<