[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] avoid parallel build failures
From: |
Jim Meyering |
Subject: |
[PATCH] avoid parallel build failures |
Date: |
Wed, 11 Apr 2012 21:27:17 +0200 |
Surprised by parallel build failures, I tracked them down:
>From 3fcf1fe611140eb6677d5893719bec1d96f106db Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 11 Apr 2012 21:25:48 +0200
Subject: [PATCH] avoid parallel build failures
A parallel build would fail when two concurrent sub-make processes
tried to build lib/Automake/Config.pm. The loser would complain that
grep: lib/Automake/Config.pm-t: No such file or directory
chmod: cannot access `lib/Automake/Config.pm-t': No such file or\
directory
make[1]: *** [lib/Automake/Config.pm] Error 1
* Makefile.am (update_mans): Don't build lib/Automake/Config.pm here.
Instead, depend on it from the two rules that use it:
($(srcdir)/doc/aclocal-$(APIVERSION).1): Depend on it.
($(srcdir)/doc/automake-$(APIVERSION).1): Likewise.
However, that was not enough, since even then, a parallel build
would still fail, now with this:
help2man: can't get `--help' info from automake-1.11a
Try `--no-discard-stderr' if option outputs to stderr
make: *** [doc/automake-1.11a.1] Error 1
a subsequent "make -j3" would create the missing file.
That was because help2man would invoke t/wrap/aclocal.in and
t/wrap/automake.in, each of which would require aclocal and
automake, yet those two files weren't guaranteed to be created.
Add explicit dependencies:
($(srcdir)/doc/aclocal-$(APIVERSION).1): Depend on aclocal.
($(srcdir)/doc/automake-$(APIVERSION).1): Depend on automake.
---
Makefile.am | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 991de4c..438ffe6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -459,7 +459,6 @@ MAINTAINERCLEANFILES += $(dist_man1_MANS)
update_mans = \
$(AM_V_GEN): \
- && $(MAKE) $(AM_MAKEFLAGS) lib/Automake/Config.pm \
&& PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
&& export PATH \
&& $(HELP2MAN) --output=$@
@@ -469,9 +468,9 @@ $(srcdir)/doc/aclocal.1 $(srcdir)/doc/automake.1:
&& f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
&& echo ".so man1/$$f-$(APIVERSION).1" > $@
-$(srcdir)/doc/aclocal-$(APIVERSION).1: $(srcdir)/aclocal.in
+$(srcdir)/doc/aclocal-$(APIVERSION).1: $(srcdir)/aclocal.in aclocal
lib/Automake/Config.pm
$(update_mans) aclocal-$(APIVERSION)
-$(srcdir)/doc/automake-$(APIVERSION).1: $(srcdir)/automake.in
+$(srcdir)/doc/automake-$(APIVERSION).1: $(srcdir)/automake.in automake
lib/Automake/Config.pm
$(update_mans) automake-$(APIVERSION)
--
1.7.10.128.g7945c
- [PATCH] avoid parallel build failures,
Jim Meyering <=
- Re: [PATCH] avoid parallel build failures, Stefano Lattarini, 2012/04/11
- Re: [PATCH] avoid parallel build failures, Jim Meyering, 2012/04/12
- Re: [PATCH] avoid parallel build failures, Stefano Lattarini, 2012/04/12
- Re: [PATCH] avoid parallel build failures, Jim Meyering, 2012/04/12
- Re: [PATCH] avoid parallel build failures, Stefano Lattarini, 2012/04/12
- Re: [PATCH] avoid parallel build failures, Jim Meyering, 2012/04/12
- Re: [PATCH] avoid parallel build failures, Stefano Lattarini, 2012/04/12