[build] Change the way how mcs references are passed to compiler to always use full...
[mono.git] / mcs / class / Mono.Debugger.Soft / Makefile
index 607d3523574f870523e996773d3eb7ecfe07987f..d92fb61f8a9b42622bb75b7adf1437104e2833da 100644 (file)
@@ -4,25 +4,39 @@ include ../../build/rules.make
 LIBRARY = Mono.Debugger.Soft.dll
 LIBRARY_SNK = ../mono.snk
 
-LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:Mono.Cecil.dll /r:System.Core.dll /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS -keyfile:$(LIBRARY_SNK)
+LIB_REFS = System Mono.Cecil System.Core
+LIB_MCS_FLAGS = /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS -keyfile:$(LIBRARY_SNK) /publicsign
 
-TEST_MCS_FLAGS = /r:Mono.Cecil.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = Mono.Cecil System System.Core
 
-test: dtest-app.exe dtest-excfilter.exe
-check: dtest-app.exe dtest-excfilter.exe
+VALID_TEST_PROFILE := $(filter net_4_x, $(PROFILE))
+
+# The test exe is not profile specific, and compiling a 2.0 will make the 4.5 tests fail
+ifdef VALID_TEST_PROFILE
+
+test-local: dtest-app.exe dtest-excfilter.exe
 
 dtest-app.exe: Test/dtest-app.cs
-       $(CSCOMPILE) -out:$@ -unsafe -debug Test/dtest-app.cs
+       $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs
 
 dtest-excfilter.exe: Test/dtest-excfilter.il
-       $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
+       MONO_PATH=$(topdir)/class/lib/$(PROFILE) $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
 
-CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb
+else
 
-#NO_TEST = yes
+NO_TEST=1
+check:
 
-ifneq (net_2_0, $(PROFILE))
-NO_INSTALL = yes
 endif
 
+CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb dtest-app.pdb dtest-excfilter.exe dtest-excfilter.exe.mdb dtest-excfilter.pdb
+
+EXTRA_DISTFILES = \
+       Test/dtest-app.cs \
+       Test/dtest.cs \
+       Test/dtest-excfilter.il
+
+#NO_TEST = yes
+
 include ../../build/library.make