From ee8769ddaff1b69bfd1a959c3c58a96416736890 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 21 Oct 2009 12:28:00 +0300 Subject: Fixed .make.cache write collision on symbian-sbsv2 builds If a project was built for more than one target with single sbs command, .make.cache generation could sometime fail because multiple jobs attempted to write into it simultaneously. Now only one of the specified targets will be used to generate .make.cache, making collisions impossible. Reviewed-by: Janne Anttila --- mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm index 7fada1e..634fafa 100644 --- a/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm @@ -9,6 +9,14 @@ include $(FLMHOME)/metaflm.mk +SINGLETON:=$(call sanitise,TSTORE_SINGLETON_$(EXTENSION_ROOT)) + +ifeq ($($(SINGLETON)),) +# Prevent duplicate targets from being created, as that can lead to build breaks +# in multiprocessor systems if two or more targets try to write to .make.cache at +# the same time. +$(SINGLETON):=1 + STORE_BUILD_TARGET:=$(call sanitise,TSTORE_BUILD_$(PLATFORM_PATH)_$(CFG_PATH)_$(EXTENSION_ROOT)) CACHE_FILENAME:=$(EXTENSION_ROOT)/.make.cache @@ -37,4 +45,5 @@ endef $(eval $(qmake_store_build)) $(eval $(call GenerateStandardCleanTarget,$(CACHE_FILENAME),'')) +endif -- cgit v0.12