* 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
+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.
2009-07-20 Jb Evain <jbevain@novell.com>
* profiles/monotouch.make: add monotouch profile.
ifdef LIBRARY_NEEDS_POSTPROCESSING
build_libdir = fixup/$(PROFILE)/
ifdef LIBRARY_NEEDS_POSTPROCESSING
build_libdir = fixup/$(PROFILE)/
-build_lib = $(build_libdir)$(LIBRARY_NAME)
-library_CLEAN_FILES += $(build_lib) $(build_lib:.dll=.pdb)
+ifdef LIBRARY_USE_INTERMEDIATE_FILE
+build_libdir = $(the_libdir)tmp/
+else
+build_libdir = $(the_libdir)
+endif
+build_lib = $(build_libdir)$(LIBRARY_NAME)
+library_CLEAN_FILES += $(build_lib) $(build_lib:.dll=.pdb)
+
ifdef NO_SIGN_ASSEMBLY
SN = :
else
ifdef NO_SIGN_ASSEMBLY
SN = :
else
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
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)
# 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)
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
$(SN) $(SNFLAGS) $@ $(LIBRARY_SNK)
-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)
endif
$(makefrag): $(sourcefile)