more test
[mono.git] / mcs / build / library.make
index 83783f553c0ad2118b032fb35350907a73289f06..87f5e3d2cbd7c91b2c2087ae635c2d029f435fc3 100644 (file)
@@ -45,13 +45,15 @@ lib_dir = lib
 endif
 
 makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
-the_lib = $(topdir)/class/$(lib_dir)/$(PROFILE)/$(LIBRARY_NAME)
+the_libdir = $(topdir)/class/$(lib_dir)/$(PROFILE)/
+the_lib = $(the_libdir)$(LIBRARY_NAME)
 the_pdb = $(the_lib:.dll=.pdb)
 the_mdb = $(the_lib).mdb
 library_CLEAN_FILES += $(makefrag) $(the_lib) $(the_pdb) $(the_mdb)
 
 ifdef LIBRARY_NEEDS_POSTPROCESSING
-build_lib = fixup/$(PROFILE)/$(LIBRARY_NAME)
+build_libdir = fixup/$(PROFILE)/
+build_lib = $(build_libdir)$(LIBRARY_NAME)
 library_CLEAN_FILES += $(build_lib) $(build_lib:.dll=.pdb)
 else
 build_lib = $(the_lib)
@@ -88,13 +90,6 @@ endif
 
 endif
 
-ifdef NO_INSTALL
-GACUTIL = :
-else
-gacutil = $(topdir)/class/lib/net_1_1_bootstrap/gacutil.exe
-GACUTIL = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(gacutil)
-endif
-
 ifdef NO_SIGN_ASSEMBLY
 SN = :
 else
@@ -156,11 +151,15 @@ LIBRARY_PACKAGE = $(FRAMEWORK_VERSION)
 endif
 endif
 
+ifneq (none, $(LIBRARY_PACKAGE))
+package_flag = /package $(LIBRARY_PACKAGE)
+endif
+
 install-local: $(gacutil)
-       $(GACUTIL) /i $(the_lib) /f $(gacdir_flag) /root $(GACROOT) /package $(LIBRARY_PACKAGE)
+       $(GACUTIL) /i $(the_lib) /f $(gacdir_flag) /root $(GACROOT) $(package_flag)
 
 uninstall-local: $(gacutil)
-       -$(GACUTIL) /u $(LIBRARY_NAME:.dll=) $(gacdir_flag) /root $(GACROOT) /package $(LIBRARY_PACKAGE)
+       -$(GACUTIL) /u $(LIBRARY_NAME:.dll=) $(gacdir_flag) /root $(GACROOT) $(package_flag)
 
 endif
 endif
@@ -191,11 +190,12 @@ test_assemblies += $(btest_lib)
 endif
 
 ifdef test_assemblies
+check: run-test
 test-local: $(test_assemblies)
 run-test-local: run-test-lib
 run-test-ondotnet-local: run-test-ondotnet-lib
 
-TEST_HARNESS_EXCLUDES = /exclude:NotWorking,ValueAdd,CAS,InetAccess,NunitWeb
+TEST_HARNESS_EXCLUDES = /exclude:NotWorking,ValueAdd,CAS,InetAccess
 TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:NotDotNet,CAS
 
 ifdef TEST_HARNESS_VERBOSE
@@ -207,13 +207,13 @@ else
 TEST_HARNESS_OUTPUT = /output:TestResult-$(PROFILE).log
 TEST_HARNESS_OUTPUT_ONDOTNET = /output:TestResult-ondotnet-$(PROFILE).log
 TEST_HARNESS_POSTPROC = (echo ''; cat TestResult-$(PROFILE).log) | sed '1,/^Tests run: /d'
-TEST_HARNESS_POSTPROC_ONDOTNET = (echo ''; cat TestResult-$(PROFILE).log) | sed '1,/^Tests run: /d'
+TEST_HARNESS_POSTPROC_ONDOTNET = (echo ''; cat TestResult-ondotnet-$(PROFILE).log) | sed '1,/^Tests run: /d'
 endif
 
 ## FIXME: i18n problem in the 'sed' command below
 run-test-lib: test-local
        ok=:; \
-       MONO_REGISTRY_PATH=$(HOME)/.mono/registry $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) /xml:TestResult-$(PROFILE).xml $(test_assemblies) || ok=false; \
+       MONO_REGISTRY_PATH="$(HOME)/.mono/registry" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) /xml:TestResult-$(PROFILE).xml $(test_assemblies) || ok=false; \
        $(TEST_HARNESS_POSTPROC) ; $$ok
 
 run-test-ondotnet-lib: test-local
@@ -222,7 +222,7 @@ run-test-ondotnet-lib: test-local
        $(TEST_HARNESS_POSTPROC_ONDOTNET) ; $$ok
 endif
 
-DISTFILES = $(sourcefile) $(EXTRA_DISTFILES)
+DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES)
 
 TEST_FILES =
 
@@ -235,9 +235,10 @@ TEST_FILES += `sed -e '/^$$/d' -e 's,^,Test/,' $(btest_sourcefile)`
 DISTFILES += $(btest_sourcefile)
 endif
 
+# make dist will collect files in .sources files from all profiles
 dist-local: dist-default
        subs=' ' ; \
-       for f in `cat $(sourcefile)` $(TEST_FILES) ; do \
+       for f in `$(topdir)/tools/removecomments.sh $(wildcard *$(LIBRARY).sources)` $(TEST_FILES) ; do \
          case $$f in \
          ../*) : ;; \
          *) dest=`dirname $$f` ; \
@@ -290,7 +291,9 @@ endif
 
 # The library
 
-$(build_lib): $(response) $(sn) $(BUILT_SOURCES)
+$(the_lib): $(the_libdir)/.stamp
+
+$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp)
 ifdef LIBRARY_USE_INTERMEDIATE_FILE
        $(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$(LIBRARY_NAME) $(BUILT_SOURCES_cmdline) @$(response)
        $(SN) $(SNFLAGS) $(LIBRARY_NAME) $(LIBRARY_SNK)
@@ -351,5 +354,11 @@ $(btest_makefrag): $(btest_response)
 
 endif
 
+## Include corcompare stuff
+include $(topdir)/build/corcompare.make
+
 all-local: $(makefrag) $(test_makefrag) $(btest_makefrag)
-$(makefrag) $(test_makefrag) $(btest_makefrag): $(topdir)/build/library.make
+ifneq ($(response),$(sourcefile))
+$(response): $(topdir)/build/library.make $(depsdir)/.stamp
+endif
+$(makefrag) $(test_response) $(test_makefrag) $(btest_response) $(btest_makefrag): $(topdir)/build/library.make $(depsdir)/.stamp