Attempt to workaround the race condition causing interminent linux build failures while building dynamic prpls, rs=aleth.
authorFlorian Quèze <florian@queze.net>
Thu, 29 Oct 2015 19:12:02 +0100
changeset 780 7f82a8aa600d0e94f6e2b69919844835878da8d4
parent 779 45eb4fb2d037835b5a234d428baaaa0b6fe0df89
child 781 d18b0bddc4f8190e1bc07576e018557bd38b5150
push id56
push userflorian@queze.net
push dateThu, 29 Oct 2015 18:12:12 +0000
reviewersaleth
Attempt to workaround the race condition causing interminent linux build failures while building dynamic prpls, rs=aleth.
libpurple/protocols/prpl-rules.mk
--- a/libpurple/protocols/prpl-rules.mk
+++ b/libpurple/protocols/prpl-rules.mk
@@ -5,19 +5,20 @@
 include $(topsrcdir)/config/rules.mk
 
 ifeq (,$(filter $(PROTOCOL),$(STATIC_PRPLS)))
 
 _RC_STRING += -SRCDIR .
 
 PURPLEXPCOM_PATH = ../../../purplexpcom/src
 PURPLEXPCOM_LIB = $(PURPLEXPCOM_PATH)/$(DLL_PREFIX)purplexpcom$(DLL_SUFFIX)
+PURPLEXPCOM_LOCK = $(PURPLEXPCOM_PATH)/lock
 
 $(PURPLEXPCOM_LIB):
-	$(MAKE) -C $(PURPLEXPCOM_PATH) compile
+	if [ -f $(PURPLEXPCOM_LOCK) ]; then sleep 30; else touch $(PURPLEXPCOM_LOCK); $(MAKE) -C $(PURPLEXPCOM_PATH) compile ; rm -f $(PURPLEXPCOM_LOCK) ; fi
 
 xpcomModule.cpp: $(srcdir)/../xpcomModule.cpp.in xpcomCid.h $(PURPLEXPCOM_LIB)
 	sed 's/@PROTOCOL@/$(PROTOCOL)/g' $< > $@
 
 xpcomCid.h:
 	bash $(srcdir)/../create-cid.sh > $@
 
 module.rc: module.ver