Flush (work in progress)
[mono.git] / mcs / errors / Makefile
index 64545f3c80aba0ada7c2ae86547510947dea5841..33b20aaf52b5650f3cc5583e44189946a8326314 100644 (file)
@@ -3,21 +3,11 @@ SUBDIRS =
 include ../build/rules.make
 
 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
-with_mono_path_n11b = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
 
-ifeq (default, $(PROFILE))
-# force this, we don't case if CSC is broken. This also
-# means we can use --options, yay.
+EXTRA_SUPPORT_FILES = CSFriendAssembly-lib.dll GCS0122-2-lib.dll GCS0730-lib.dll GCS0733-lib.dll GCS1685-lib.dll
 
-MCS = $(with_mono_path) $(INTERNAL_MCS)
-else
-EXTRA_SUPPORT_FILES = CSFriendAssembly-lib.dll GCS0730-lib.dll GCS0733-lib.dll
-endif
-
-ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe
-ILASM = $(with_mono_path_n11b) $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
-
-GENERICS_COMPILE = $(CSCOMPILE) /target:library
+ilasm = $(topdir)/class/lib/$(PROFILE)/ilasm.exe
+ILASM = $(with_mono_path) $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
 
 DISTFILES = \
        CONTRIBUTORS_README     \
@@ -36,47 +26,60 @@ TEST_SUPPORT_FILES = \
        CS0205-3-lib.dll \
        CS0229-3-lib.dll CS0229-4-lib.dll \
        CS0433-lib.dll CS0433-2-lib.dll \
-       CS0534-3-lib.dll CS0534-4-lib.dll CS0571-3-lib.dll \
+       CS0534-3-lib.dll CS0534-4-lib.dll CS0571-3-lib.dll CS0571-5-lib.dll CS0571-6-lib.dll \
        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 \
-       CS0619-43-lib.dll CS1546-lib.dll CS0619-51-lib.dll CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
+       CS0619-43-lib.dll CS1546-lib.dll CS0619-51-lib.dll CS1509-module.dll CS1681-2-lib.dll \
+       CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
        $(EXTRA_SUPPORT_FILES) 
 
-all-local:
+# mention all targets
+all-local $(STD_TARGETS:=-local):
 
-test-local: $(TEST_SUPPORT_FILES)
+VALID_PROFILE := $(filter net_2_0 moonlight net_4_0, $(PROFILE))
+ifdef VALID_PROFILE
 
-run-test-ondotnet-local:
+qcheck: run-mcs-tests 
 
 # again, run-test is when the tests actually happen, so
 # don't compile on make test.
 
-run-test-local: run-mcs-tests 
+test-local:
+       @:
 
-test-everything:
-       $(MAKE) PROFILE=default run-test
-       $(MAKE) PROFILE=net_2_0 run-test
+run-test-local: clean-local
+       $(MAKE) run-mcs-tests
 
+ifeq (net_4_0, $(PROFILE))
+COMPILER_NAME = dmcs
+TEST_PATTERN = 'v4'
+endif
+ifeq (moonlight, $(PROFILE))
+COMPILER_NAME = smcs
+TEST_PATTERN = 'v2'
+LOCAL_RUNTIME_FLAGS = --security=temporary-smcs-hack
+endif
 ifeq (net_2_0, $(PROFILE))
 COMPILER_NAME = gmcs
-COMPILER = $(topdir)/class/lib/$(PROFILE)/gmcs.exe
-TEST_PATTERN = '*cs*.cs'
-else
-COMPILER_NAME = mcs
-COMPILER = $(topdir)/class/lib/$(PROFILE)/mcs.exe
-TEST_PATTERN = 'cs*.cs'
+TEST_PATTERN = 'v2'
 endif
 
+COMPILER = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
+TESTER = MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(LOCAL_RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
+
+# Required to test parser correctly
+TESTER_OPTIONS +=-compiler-options:-v
+
 run-mcs-tests: $(TEST_SUPPORT_FILES)
+       $(TESTER) -mode:neg -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TESTER_OPTIONS)
 
-run-mcs-tests:
-       MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe negative 0 $(COMPILER) known-issues-$(COMPILER_NAME) $(COMPILER_NAME).log
+endif
 
 clean-local:
        rm -f *.exe *.dll *.log *.mdb dummy.xml *.junk
 
 dist-local: dist-default
 
-install-local uninstall-local:
+csproj-local install-local uninstall-local:
 
 %-lib.dll: %-lib.cs
        $(CSCOMPILE) /target:library /out:$@ $<