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/build
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2009-07-26 20:56:02 +0400
committerRaja R Harinath <harinath@hurrynot.org>2009-07-26 20:56:02 +0400
commit38c89643f2d8cf1ae6c6a4182f05e1cc5bf3df83 (patch)
tree7859456770cb95a675c425aa4820cd55fde65df2 /mcs/build
parentd531a7515eaad9fb1c2ca9fff160851fa70aa168 (diff)
Fix parallel-build issues with LIBRARY_USE_INTERMEDIATE_FILE
* library.make (build_lib): Define to a profile dependent temporary location for LIBRARY_USE_INTERMEDIATE_FILE. (DO_AOT): New. Extracted from ... ($(build_lib)): ... here. Simplify. Extract code handling LIBRARY_USE_INTERMEDIATE_FILE into ... ($(the_lib)) [LIBRARY_USE_INTERMEDIATE_FILE]: ... here, a new rule that takes care of copying the library from its temporary location to the final location. svn path=/trunk/mcs/; revision=138691
Diffstat (limited to 'mcs/build')
-rw-r--r--mcs/build/ChangeLog12
-rw-r--r--mcs/build/library.make43
2 files changed, 39 insertions, 16 deletions
diff --git a/mcs/build/ChangeLog b/mcs/build/ChangeLog
index b7e5d6ad6e1..3ccc2048b3e 100644
--- a/mcs/build/ChangeLog
+++ b/mcs/build/ChangeLog
@@ -1,3 +1,15 @@
+2009-07-26 Raja R Harinath <harinath@hurrynot.org>
+
+ Fix parallel-build issues with LIBRARY_USE_INTERMEDIATE_FILE
+ * library.make (build_lib): Define to a profile dependent
+ temporary location for LIBRARY_USE_INTERMEDIATE_FILE.
+ (DO_AOT): New. Extracted from ...
+ ($(build_lib)): ... here. Simplify. Extract code handling
+ LIBRARY_USE_INTERMEDIATE_FILE into ...
+ ($(the_lib)) [LIBRARY_USE_INTERMEDIATE_FILE]: ... here, a new rule
+ that takes care of copying the library from its temporary location
+ to the final location.
+
2009-07-20 Jb Evain <jbevain@novell.com>
* profiles/monotouch.make: add monotouch profile.
diff --git a/mcs/build/library.make b/mcs/build/library.make
index c7cb676e824..ea234e42ac9 100644
--- a/mcs/build/library.make
+++ b/mcs/build/library.make
@@ -53,12 +53,17 @@ library_CLEAN_FILES += $(makefrag) $(the_lib) $(the_lib).so $(the_pdb) $(the_mdb
ifdef LIBRARY_NEEDS_POSTPROCESSING
build_libdir = fixup/$(PROFILE)/
-build_lib = $(build_libdir)$(LIBRARY_NAME)
-library_CLEAN_FILES += $(build_lib) $(build_lib:.dll=.pdb)
else
-build_lib = $(the_lib)
+ifdef LIBRARY_USE_INTERMEDIATE_FILE
+build_libdir = $(the_libdir)tmp/
+else
+build_libdir = $(the_libdir)
+endif
endif
+build_lib = $(build_libdir)$(LIBRARY_NAME)
+library_CLEAN_FILES += $(build_lib) $(build_lib:.dll=.pdb)
+
ifdef NO_SIGN_ASSEMBLY
SN = :
else
@@ -216,27 +221,33 @@ endif
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
+ifdef ENABLE_AOT
+ifneq (,$(filter $(AOT_IN_PROFILES), $(PROFILE)))
+
+DO_AOT := $(Q_AOT) MONO_PATH='$(build_libdir):$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version
+
+endif
+endif
+
+ifndef DO_AOT
+DO_AOT = @:
+endif
+
# The library
$(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)
- $(Q) mv $(LIBRARY_NAME) $@
- $(Q) test ! -f $(LIBRARY_NAME).mdb || mv $(LIBRARY_NAME).mdb $@.mdb
- $(Q) test ! -f $(LIBRARY_NAME:.dll=.pdb) || mv $(LIBRARY_NAME:.dll=.pdb) $(dir $@)$(LIBRARY_NAME:.dll=.pdb)
-else
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
$(SN) $(SNFLAGS) $@ $(LIBRARY_SNK)
-endif
-
+ $(DO_AOT) $@
-ifdef ENABLE_AOT
-ifneq (,$(filter $(AOT_IN_PROFILES), $(PROFILE)))
- $(Q_AOT) MONO_PATH=$(the_libdir) $(RUNTIME) --aot=bind-to-runtime-version $@ > $(PROFILE)_aot.log 2>&1
-endif
+ifdef LIBRARY_USE_INTERMEDIATE_FILE
+$(the_lib): $(build_lib)
+ $(Q) cp $(build_lib) $@
+ $(Q) test ! -f $(build_lib).mdb || mv $(build_lib).mdb $@.mdb
+ $(Q) test ! -f $(build_lib).so || mv $(build_lib).so $@.so
+ $(Q) test ! -f $(build_lib:.dll=.pdb) || mv $(build_lib:.dll=.pdb) $(the_lib:.dll=.pdb)
endif
$(makefrag): $(sourcefile)