summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/Makefile.am
diff options
context:
space:
mode:
authorKaleb KEITHLEY <kkeithle@f16node1.kkeithle.usersys.redhat.com>2011-12-01 12:44:38 -0500
committerAnand Avati <avati@gluster.com>2011-12-01 23:19:32 -0800
commit430f76a6c1c9af06b433a9d6080168b92b30e034 (patch)
tree6134d8fc9e952bf1be89532dc182bdeb9cea9b10 /libglusterfs/src/Makefile.am
parentf5d5e8012a3762d0ffb95a0ca624a3fce3c262cd (diff)
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 We found that the previous fix would still occasionally trip the race condition. This revised patch changes the automake Makefile.am to generate the parser files without incurring the race condition. An extra dimension of the problem is that the tarball from http://download.gluster.com/pub/gluster/glusterfs/3.2/3.2.5/glusterfs-3.2.5.tar.gz contains files that you don't get when you clone from the git repo (e.g. libgluster/src/{graph.lex.c,y.tab.c}, and all the Makefile.in files) so build issues on fedora build systems do not manifest themselves on jenkins and vice versa. 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: Iaeecb59c61a77bf3927da18253c83cf5ffed4254 Reviewed-on: http://review.gluster.com/765 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'libglusterfs/src/Makefile.am')
-rw-r--r--libglusterfs/src/Makefile.am15
1 files changed, 8 insertions, 7 deletions
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 0af9774336f..25de376aaeb 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -13,7 +13,7 @@ lib_LTLIBRARIES = libglusterfs.la
CONTRIB_BUILDDIR = $(top_builddir)/contrib
-libglusterfs_la_SOURCES = dict.c graph.lex.c y.tab.c xlator.c logging.c \
+libglusterfs_la_SOURCES = dict.c xlator.c logging.c \
hashfn.c defaults.c common-utils.c timer.c inode.c call-stub.c \
compat.c fd.c compat-errno.c event.c mem-pool.c gf-dirent.c syscall.c \
iobuf.c globals.c statedump.c stack.c checksum.c daemon.c \
@@ -25,6 +25,10 @@ libglusterfs_la_SOURCES = dict.c graph.lex.c y.tab.c xlator.c logging.c \
$(CONTRIBDIR)/uuid/isnull.c $(CONTRIBDIR)/uuid/unpack.c syncop.c \
graph-print.c trie.c run.c options.c
+nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c
+
+BUILT_SOURCES = graph.lex.c
+
noinst_HEADERS = common-utils.h defaults.h dict.h glusterfs.h hashfn.h \
logging.h xlator.h stack.h timer.h list.h inode.h call-stub.h compat.h \
fd.h revision.h compat-errno.h event.h mem-pool.h byte-order.h \
@@ -37,14 +41,11 @@ noinst_HEADERS = common-utils.h defaults.h dict.h glusterfs.h hashfn.h \
EXTRA_DIST = graph.l graph.y
-graph.lex.c: graph.l yacc.stamp
+graph.lex.c: graph.l y.tab.h
$(LEX) -t $(srcdir)/graph.l > $@
-yacc.stamp: y.tab.c y.tab.h
- touch $@
-
-y.tab.c y.tab.h: graph.y
+y.tab.h: graph.y
$(YACC) -d $(srcdir)/graph.y
-CLEANFILES = graph.lex.c y.tab.c y.tab.h yacc.stamp
+CLEANFILES = graph.lex.c y.tab.c y.tab.h
CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h