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.