From: Jim Meyering Date: Wed, 11 Apr 2012 19:25:48 +0000 (+0200) Subject: build: avoid parallel build failures X-Git-Tag: v1.11d~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15d4a60bec70bee6c4ddd4020dc74e669f4d3174;p=platform%2Fupstream%2Fautomake.git build: 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. [ Note that technically, the above is incorrect, since it makes those distributed doc/*.1 files depend on generated aclocal and automake. That problem is addressed by the following commit. ] 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. --- 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)