Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2014-05-09 06:26:33 +0400
committerMiguel de Icaza <miguel@gnome.org>2014-05-09 19:27:53 +0400
commit9adb22769b890d9dec0647eb098ff40a810a4aa6 (patch)
tree488d72084e9cf976e0750bb4033dd75a6317b662 /mcs
parent366c13fc51f70e2348888d9f35f77a3a01c559b8 (diff)
[build] Prevent cyclic targets from being built in parallel
Since we are invoking make recursively to satisfy the dependencies for any of the cyclic components, we need to inform make to not try to parallelize any work on any of the cyclic dependencies, otherwise multiple builds will execute building the same binary, and the result will be truncated outputs. For example, System's Makefile would launch all the parallel builds for the dependencies: $(secxml_libdir)/System.dll \ $(the_libdir_base)System.Xml.dll \ $(the_libdir_base)Mono.Security.dll \ $(bare_libdir)/System.dll They could be launched in parallel, and in turn the makefiles on those directories might try simultaneously to invoke recursively a component that has not been built yet. So we use .NOTPARALLEL to flag all the cyclic dependencies on a given directory to instruct make to not run those in parallel.
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/Mono.CompilerServices.SymbolWriter/Makefile4
-rw-r--r--mcs/class/Mono.Dynamic.Interpreter/Makefile4
-rw-r--r--mcs/class/Mono.Security/Makefile4
-rw-r--r--mcs/class/System.Configuration/Makefile2
-rw-r--r--mcs/class/System.Core/Makefile2
-rw-r--r--mcs/class/System.Security/Makefile2
-rw-r--r--mcs/class/System.XML/Makefile6
-rw-r--r--mcs/class/System/Makefile14
8 files changed, 30 insertions, 8 deletions
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/Makefile b/mcs/class/Mono.CompilerServices.SymbolWriter/Makefile
index 18f44bfc439..a41385133e4 100644
--- a/mcs/class/Mono.CompilerServices.SymbolWriter/Makefile
+++ b/mcs/class/Mono.CompilerServices.SymbolWriter/Makefile
@@ -20,4 +20,6 @@ include ../../build/library.make
$(build_lib): $(bare_libdir)/System.dll
$(bare_libdir)/System.dll:
- (cd ../System; make $@) \ No newline at end of file
+ (cd ../System; make $@)
+
+.NOTPARALLEL: $(bare_libdir)/System.dll \ No newline at end of file
diff --git a/mcs/class/Mono.Dynamic.Interpreter/Makefile b/mcs/class/Mono.Dynamic.Interpreter/Makefile
index fd4c14ecf71..76777611827 100644
--- a/mcs/class/Mono.Dynamic.Interpreter/Makefile
+++ b/mcs/class/Mono.Dynamic.Interpreter/Makefile
@@ -19,4 +19,6 @@ include ../../build/library.make
$(the_libdir_base)Mono.Dynamic.Interpreter.dll: $(mono_dynamic_interpreter_deps)
$(the_libdir_base)plaincore/System.Core.dll:
- (cd ../System.Core; $(MAKE) $@) \ No newline at end of file
+ (cd ../System.Core; $(MAKE) $@)
+
+.NOTPARALLEL: $(the_libdir_base)plaincore/System.Core.dll \ No newline at end of file
diff --git a/mcs/class/Mono.Security/Makefile b/mcs/class/Mono.Security/Makefile
index 7fb6e714766..db825677a5b 100644
--- a/mcs/class/Mono.Security/Makefile
+++ b/mcs/class/Mono.Security/Makefile
@@ -11,4 +11,6 @@ include ../../build/library.make
$(build_lib): $(the_libdir_base)bare/System.dll
$(the_libdir_base)bare/System.dll:
- (cd ../System; $(MAKE) $@) \ No newline at end of file
+ (cd ../System; $(MAKE) $@)
+
+.NOTPARALLEL: $(the_libdir_base)bare/System.dll \ No newline at end of file
diff --git a/mcs/class/System.Configuration/Makefile b/mcs/class/System.Configuration/Makefile
index 7b85426edf6..01593bf8be9 100644
--- a/mcs/class/System.Configuration/Makefile
+++ b/mcs/class/System.Configuration/Makefile
@@ -16,6 +16,8 @@ configuration_library_deps = \
$(build_lib): $(configuration_library_deps)
+.NOTPARALLEL: $(configuration_library_deps)
+
$(secxml_libdir)/System.dll:
@echo System.Configuration: GETTING: $@
(cd ../System; $(MAKE) $@)
diff --git a/mcs/class/System.Core/Makefile b/mcs/class/System.Core/Makefile
index 171203c226d..f4553b66e84 100644
--- a/mcs/class/System.Core/Makefile
+++ b/mcs/class/System.Core/Makefile
@@ -53,6 +53,8 @@ include ../../build/library.make
$(the_libdir_base)System.Core.dll: $(system_core_library_deps)
+.NOTPARALLEL: $(system_core_plain_libdir)/System.Core.dll $(the_libdir_base)Mono.Dynamic.Interpreter.dll
+
ifneq (plaincore/,$(intermediate))
$(system_core_plain_libdir)/System.Core.dll:
$(MAKE) intermediate=plaincore/ $(system_core_plain_libdir)/System.Core.dll
diff --git a/mcs/class/System.Security/Makefile b/mcs/class/System.Security/Makefile
index 1101a28c0dd..fb1c23c92b0 100644
--- a/mcs/class/System.Security/Makefile
+++ b/mcs/class/System.Security/Makefile
@@ -32,6 +32,8 @@ $(secxml_libdir)/System.dll:
$(bare_libdir)/Mono.Security.dll:
(cd ../Mono.Security; $(MAKE))
+.NOTPARALLEL: $(secxml_libdir)/System.dll $(bare_libdir)/Mono.Security.dll
+
# run the PKITS tests only if the data was installed/activated, otherwise ignore them
ifeq (net_2_0, $(PROFILE))
pkits_files := $(wildcard ../System/Test/System.Security.Cryptography.X509Certificates/pkits/hint)
diff --git a/mcs/class/System.XML/Makefile b/mcs/class/System.XML/Makefile
index 64c28192748..9fd5ad51035 100644
--- a/mcs/class/System.XML/Makefile
+++ b/mcs/class/System.XML/Makefile
@@ -97,7 +97,6 @@ build-bare:
else
$(bare_libdir)/System.Xml.dll:
$(MAKE) intermediate=bare/ $(bare_libdir)/System.Xml.dll
- echo DONE
endif
system_xml_library_deps := \
@@ -108,6 +107,11 @@ ifndef PROFILE_ANY_MOBILE
system_xml_library_deps += $(the_libdir_base)System.Configuration.dll
endif
+artifacts = $(system_xml_library_deps) \
+ $(the_libdir_base)System.Configuration.dll
+
+.NOTPARALLEL: $(artifacts)
+
CLEAN_FILES = $(bare_libdir)/System.Xml.dll $(bare_libdir)/System.Xml.dll.pdb
$(the_libdir_base)System.Xml.dll: $(system_xml_library_deps)
$(bare_libdir)/System.dll:
diff --git a/mcs/class/System/Makefile b/mcs/class/System/Makefile
index b401ff84ed1..d78b6e2ccd8 100644
--- a/mcs/class/System/Makefile
+++ b/mcs/class/System/Makefile
@@ -74,16 +74,22 @@ include ../../build/library.make
system_library_deps := \
$(secxml_libdir)/System.dll \
- $(the_libdir_base)System.Xml.dll \
- $(the_libdir_base)Mono.Security.dll
+ $(the_libdir_base)System.Xml.dll \
+ $(the_libdir_base)Mono.Security.dll \
+ $(bare_libdir)/System.dll
ifndef PROFILE_ANY_MOBILE
system_library_deps += $(the_libdir_base)System.Configuration.dll
endif
-build-test-dep-xml: $(the_libdir_base)System.Xml.dll
+artifacts = $(system_library_deps) \
+ $(bare_libdir)/System.Xml.dll \
+ $(the_libdir_base)Mono.Security.dll \
+ $(the_libdir_base)System.Configuration.dll
-$(the_libdir_base)System.dll: $(system_library_deps)
+.NOTPARALLEL: $(system_library_deps)
+
+$(the_libdir_base)System.dll: $(system_library_deps)
ifeq (bare/,$(intermediate))
build-bare: