2009-03-10 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mcs / class / corlib / Makefile
index 69772f5f70407925943c0955bdd69a62cf1d32b4..20113c7967a6726368c107e904b6d6587ebad16c 100644 (file)
@@ -3,6 +3,16 @@ SUBDIRS =
 include ../../build/rules.make
 export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/corlib
 
+LIBRARY = corlib.dll
+LIBRARY_NAME = mscorlib.dll
+LIB_MCS_FLAGS = $(corlib_flags) $(RESOURCE_FILES:%=-resource:%)
+LIBRARY_USE_INTERMEDIATE_FILE = yes
+
+LIBRARY_COMPILE = $(BOOT_COMPILE)
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+
+AOT_IN_PROFILES = net_1_1
+
 RESOURCE_FILES = \
        resources/collation.core.bin \
        resources/collation.tailoring.bin \
@@ -13,73 +23,28 @@ RESOURCE_FILES = \
        resources/collation.cjkKOlv2.bin
 
 corlib_flags = -unsafe -nostdlib
-LOCAL_MCS_FLAGS = -nowarn:169,612,618,649 -d:INSIDE_CORLIB
+LOCAL_MCS_FLAGS = -nowarn:612,618 -d:INSIDE_CORLIB
 
-ifneq ($(FRAMEWORK_VERSION),1.0)
-LOCAL_MCS_FLAGS += -nowarn:414
-endif
-
-LIBRARY = corlib.dll
-LIBRARY_NAME = mscorlib.dll
-LIB_MCS_FLAGS = $(corlib_flags) $(RESOURCE_FILES:%=/resource:%)
-LIBRARY_USE_INTERMEDIATE_FILE = yes
-
-LIBRARY_COMPILE = $(BOOT_COMPILE)
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+# System.IO/DirectoryInfoTest.cs needs Mono.Posix
+TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe -r:$(topdir)/class/lib/$(PROFILE)/Mono.Posix.dll -define:MONO_DATACONVERTER_STATIC_METHODS
 
 EXTRA_DISTFILES = \
-       corlib.dll.win32-excludes corlib_cmp.dll.excludes corlib_res.dll.excludes \
-       $(plattestlib).excludes                 \
+       corlib.dll.win32-excludes               \
        Test/ms_run_test.sh                     \
        Test/resources/MyResources.resources    \
+       Test/resources/MyResources.de.resources \
        Test/resources/Empty.resources          \
-       Test/resources/AFile.txt                        \
+       Test/resources/AFile.txt                \
+       Test/resources/StreamTest.resources     \
+       Test/resources/StreamTest.ja.resources  \
+       Test/resources/bug81759.resources       \
+       Test/resources/415628.bin               \
+       Test/resources/Fergie.GED               \
        $(RESOURCE_FILES)
 
-CLEAN_FILES = $(cmplib) $(reslib) $(plattestlib) $(plattestlib).sources \
-              $(cmp_response) $(cmp_makefrag) \
-              $(res_response) $(res_makefrag) \
-              $(cmppdb) $(respdb) $(plattestpdb)
-
-# If building on a non mono-native platform, default
-# to running the unit tests on its corlib, to see if
-# our tests are complaint with their (hopefully bug-free)
-# corlib. If on a mono-native platform, test our actual
-# corlib.
-#
-# You can access either one on demand with either 'make
-# run-monotest' or 'make run-plattest'.
-
-plattestlib = corlib_plattest.dll
-plattestpdb = $(patsubst %.dll,%.pdb,$(plattestlib))
-$(plattestlib).sources: corlib_test.dll.sources $(plattestlib).excludes
-       sort corlib_test.dll.sources $(plattestlib).excludes | uniq -u >$@
-
-TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe
-
-ifndef PLATFORM_MONO_NATIVE
-test_lib = $(plattestlib)
-test_against = $(PLATFORM_CORLIB)
-HAVE_CS_TESTS = $(plattestlib).sources
-
-## for now, compiling the testsuite with CSC causes CS0583.  So compile with internal MCS
-TEST_COMPILE = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MCS) $(USE_MCS_FLAGS)
-endif
-
-include ../../build/library.make
-
-ifndef PLATFORM_MONO_NATIVE
-run-monotest:
-       $(MAKE) $(reslib)
-       $(MAKE) test_lib=corlib_test.dll test_against=$(reslib) run-test
-
-run-plattest:
-       $(MAKE) test_lib=$(plattestlib) test_against='$(PLATFORM_CORLIB)' run-test
-
-else
-run-monotest: run-test
-endif
+include $(topdir)/build/library.make
 
+ifdef FIXME_CORLIB_CMP
 # corlib_cmp
 cmplib = $(topdir)/class/lib/$(PROFILE)/corlib_cmp.dll
 cmppdb = $(cmplib:.dll=.pdb)
@@ -87,6 +52,9 @@ cmp_response = $(depsdir)/$(PROFILE)_corlib_cmp.dll.response
 cmp_makefrag = $(depsdir)/$(PROFILE)_corlib_cmp.dll.makefrag
 cmp_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
 
+EXTRA_DISTFILES += corlib_cmp.dll.excludes
+CLEAN_FILES += $(cmplib) $(cmp_response) $(cmp_makefrag) $(cmppdb)
+
 $(cmplib): $(cmp_makefrag) $(cmp_response)
        $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(cmp_flags) -target:library -out:$@ @$(cmp_response)
 
@@ -105,23 +73,13 @@ $(cmp_makefrag): $(cmp_response)
 #
 # -include $(cmp_makefrag)
 
-# corlib_res
-reslib = $(topdir)/class/lib/$(PROFILE)/corlib_res.dll
-respdb = $(reslib:.dll=.pdb)
-res_response = $(depsdir)/$(PROFILE)_corlib_res.dll.response
-res_makefrag = $(depsdir)/$(PROFILE)_corlib_res.dll.makefrag
-res_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
-
-$(reslib): $(res_makefrag) $(res_response)
-       $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(res_flags) -target:library -out:$@ @$(res_response)
-
-$(res_response): $(sourcefile) corlib_res.dll.excludes
-       @echo Creating $@ ...
-       @sort $(sourcefile) corlib_res.dll.excludes | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
-
-# warning: embedded tab in the 'echo touch' line
-$(res_makefrag): $(res_response)
-       @echo Creating $@ ...
-       @sed 's,^,$(reslib): ,' $< >$@
+$(cmp_response) $(cmp_makefrag): Makefile $(depsdir)/.stamp
+endif
 
--include $(res_makefrag)
+#
+# qh21 = Quick Hack for 2.1, to be used by impatient developers to get
+# test builds done quickly
+#
+qh21:
+       make PROFILE=net_2_1_raw
+       (cd ../../tools/tuner; rm tune.stamp; make tune.stamp && make PROFILE=net_2_1 install)