From fbf6ce560dd6e72fc9d404e32d313732077a250f Mon Sep 17 00:00:00 2001 From: Kaleb KEITHLEY Date: Tue, 29 Nov 2011 09:36:50 -0500 Subject: bz 3826, fix for parallel make in fedora build system builds of glusterfs in the fedora build system often fail due to a race condition between running yacc and starting to compile the y.tab.c produced by yacc This patch changes the automake Makefile.am to generate the parser files without incurring the race condition This works on jenkins, the fedora build system, and my f16 vm/guest machines. (Finding the right combination that works on all three was an exercise to say the least. I'm open to other suggestions for avoiding the race condition.) Run autogen.sh to (re)generate the Makefile.ins. Then run configure to produce all Makefiles, followed by `make -j X` where X>1 see also https://bugzilla.redhat.com/show_bug.cgi?id=756510 BUG: 3826 Change-Id: I06ba0d0a1d59f0f44c0dd2cd9d227ca08d99e205 Reviewed-on: http://review.gluster.com/763 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Anand Avati --- libglusterfs/src/Makefile.am | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am index a950e67d1fa..98be5b2d906 100644 --- a/libglusterfs/src/Makefile.am +++ b/libglusterfs/src/Makefile.am @@ -35,10 +35,13 @@ noinst_HEADERS = common-utils.h defaults.h dict.h glusterfs.h hashfn.h \ EXTRA_DIST = graph.l graph.y -graph.lex.c: graph.l y.tab.h +graph.lex.c: graph.l yacc.stamp $(LEX) -t $(srcdir)/graph.l > $@ +yacc.stamp: y.tab.c y.tab.h + touch $@ + y.tab.c y.tab.h: graph.y $(YACC) -d $(srcdir)/graph.y -CLEANFILES = graph.lex.c y.tab.c y.tab.h +CLEANFILES = graph.lex.c y.tab.c y.tab.h yacc.stamp -- cgit