summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-01-18 11:58:05 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-01-18 11:58:05 +0000
commit8a92711d7a29babbaf39fd06f553f4d410d323a4 (patch)
treed30e4f0ab99f8e596a0bde315159258924c2b8bd
parent23c68a6e63e4640b957146b3069db47321da828d (diff)
downloadbash-8a92711d7a29babbaf39fd06f553f4d410d323a4.tar.gz
build-system: apply Gentoo patch for parallel buildbaserock/richardmaw/mainline-parallel-make-fix
We had build failures stemming from the use of recursive make, and multiple instances attempting to build pathnames.h at once. This managed to go un-noticed for a year, possibly the introduction of ccache made compilation quick enough to trigger this behaviour. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-shells/bash/files/bash-4.2-parallel-build.patch
-rw-r--r--Makefile.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in
index 9f9276d4..297ae666 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -579,16 +579,17 @@ buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c
# old rules
GRAM_H = parser-built
-y.tab.o: y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h
+y.tab.o: y.tab.h y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h
${GRAM_H}: y.tab.h
@-if test -f y.tab.h ; then \
cmp -s $@ y.tab.h 2>/dev/null || cp -p y.tab.h $@; \
fi
-y.tab.c y.tab.h: parse.y
+y.tab.c: parse.y
# -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi
$(YACC) -d $(srcdir)/parse.y
touch parser-built
# -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; else cp -p y.tab.h ${GRAM_H}; fi
+y.tab.h: y.tab.c ; @true
# experimental new rules - work with GNU make but not BSD (or OSF) make
#y.tab.o: y.tab.c y.tab.h
@@ -597,6 +598,11 @@ y.tab.c y.tab.h: parse.y
# $(YACC) -d $(srcdir)/parse.y
# -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; fi
+# Subdirs will often times want version.h, so they'll change back up to
+# the top level and try to create it. This causes parallel build issues
+# so just force top level sanity before we descend.
+$(LIBDEP): .build
+
$(READLINE_LIBRARY): config.h $(READLINE_SOURCE)
@echo making $@ in ${RL_LIBDIR}
@( { test "${RL_LIBDIR}" = "${libdir}" && exit 0; } || \
@@ -668,7 +674,7 @@ syntax.c: mksyntax${EXEEXT} $(srcdir)/syntax.h
$(RM) $@
./mksyntax$(EXEEXT) -o $@
-$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h
+$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h ${DEFDIR}/builtext.h version.h
@(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1
# these require special rules to circumvent make builtin rules