7 include ../build/rules.make
9 DISTFILES = README.tests $(wildcard dlls/**/*.cs)
10 DISTFILES += $(wildcard *.cs) $(wildcard *.il) $(wildcard *.xml) $(wildcard *.inc) $(wildcard known-issues-*) $(wildcard *.snk)
12 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
14 ifeq (default, $(PROFILE))
15 # force this, we don't case if CSC is broken. This also
16 # means we can use --options, yay.
17 MCS = $(with_mono_path) $(INTERNAL_MCS)
19 ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe
20 ILASM = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
22 ifeq (net_2_0, $(PROFILE))
23 BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/mcs.exe
29 all-local $(STD_TARGETS:=-local):
31 VALID_PROFILE := $(filter default net_2_0 net_2_1, $(PROFILE))
34 bootstrap-cast.exe: gen-cast-test.cs
35 $(BOOT_COMPILE) -target:exe /out:$@ $<
37 casts.cs: bootstrap-cast.exe
38 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
40 casts-mcs.exe: casts.cs
41 $(CSCOMPILE) -target:exe /out:$@ $<
43 casts-boot.exe: casts.cs
44 $(BOOT_COMPILE) -target:exe /out:$@ $<
46 boot-casts.out: casts-boot.exe
47 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
49 mcs-casts.out: casts-mcs.exe
50 $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $< >$@
52 test-casts: boot-casts.out mcs-casts.out
55 test-local: casts-boot.exe
57 ifeq (net_2_1, $(PROFILE))
59 TEST_PATTERN = '*test-*.cs'
60 LOCAL_RUNTIME_FLAGS = --security=temporary-smcs-hack
62 ifeq (net_2_0, $(PROFILE))
64 TEST_PATTERN = '*test-*.cs'
65 LOCAL_RUNTIME_FLAGS = --security=validil
66 TOPTIONS += '-il:ver-il-gmcs.xml'
68 ifeq (default, $(PROFILE))
70 TEST_PATTERN = 'test-*.cs'
71 LOCAL_RUNTIME_FLAGS = --security=validil
74 COMPILER = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
75 TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
77 TEST_ILS := $(wildcard *-lib.il)
81 run-test-local: $(TEST_ILS:.il=.dll)
82 $(TESTER) -mode:pos -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TOPTIONS)
85 $(MAKE) PROFILE=default run-test
86 $(MAKE) PROFILE=net_2_0 run-test
89 $(MAKE) PROFILE=net_2_0 run-test
93 -rm -f *.exe *.dll *.netmodule *.out *.pdb *.mdb casts.cs *.log
96 dist-local: dist-default
97 rm -f $(distdir)/casts.cs
103 $(ILASM) /dll /out:$@ $<
105 ifeq (default, $(PROFILE))
106 run-test-local: ilasm
108 $(ILASM) /dll property-il.il
109 $(CSCOMPILE) /r:property-il.dll property-main.cs /out:property-main.exe
110 $(TEST_RUNTIME) property-main.exe
112 $(CSCOMPILE) -t:library dlls/test-679-2/test-679-lib-2.cs
113 $(CSCOMPILE) -t:library dlls/test-679-1/test-679-lib.cs -r:dlls/test-679-2/test-679-lib-2.dll