[build] Change the way how mcs references are passed to compiler to always use full...
[mono.git] / mcs / class / Microsoft.Build.Utilities / Makefile
index 585e5bb0a4f3e0eff7b65d00b3d29fdfec61a96c..b854d2bc853f73f702b2b428ae7fae7e3b164c9f 100644 (file)
@@ -2,27 +2,28 @@ thisdir = class/Microsoft.Build.Utilities
 SUBDIRS = 
 include ../../build/rules.make
 
-LIBRARY = Microsoft.Build.Utilities.dll
-BUILD_FRAMEWORK = Microsoft.Build.Framework.dll
+XBUILD_DIR=$(topdir)/tools/xbuild
+include $(XBUILD_DIR)/xbuild.make
 
-ifeq (3.5, $(FRAMEWORK_VERSION))
-LIBRARY_NAME = Microsoft.Build.Utilities.v3.5.dll
-BUILD_FRAMEWORK := $(topdir)/class/lib/$(PROFILE)/$(BUILD_FRAMEWORK)
-else
-ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-LIBRARY_NAME = Microsoft.Build.Utilities.v4.0.dll
-endif
-endif
+LIBRARY = Microsoft.Build.Utilities.dll
+LIBRARY_NAME = Microsoft.Build.Utilities$(NAME_SUFFIX).dll
 
-LIB_MCS_FLAGS = \
-       /r:$(corlib)                            \
-       /r:System.dll                           \
-       /r:$(BUILD_FRAMEWORK)
+LIB_REFS = $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core $(PARENT_PROFILE)System.Xml $(XBUILD_FRAMEWORK)
+LIB_MCS_FLAGS =
 
-TEST_MCS_FLAGS = /r:$(BUILD_FRAMEWORK) -r:System.dll -r:System.Core.dll
+TEST_RESX_RESOURCES = Test/Microsoft.Build.Utilities/Strings.resources
 
-export TESTING_MONO=a
-XBUILD_DIR=../../tools/xbuild
-include $(XBUILD_DIR)/xbuild_targets.make
+TEST_LIB_REFS = $(XBUILD_ENGINE) $(XBUILD_FRAMEWORK) $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core
+TEST_MCS_FLAGS = $(TEST_RESX_RESOURCES:%=-resource:%)
 
+include $(XBUILD_DIR)/xbuild_test.make
 include ../../build/library.make
+
+EXTRA_DISTFILES = $(TEST_RESX_RESOURCES:.resources=.resx)
+
+CLEAN_FILES += $(TEST_RESX_RESOURCES)
+
+$(TEST_RESX_RESOURCES): %.resources: %.resx
+       $(RESGEN) $< || cp $@.prebuilt $@
+
+$(test_lib): $(TEST_RESX_RESOURCES)