]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
build: fix race in parallel builds
authorMike Frysinger <vapier@gentoo.org>
Tue, 18 Jan 2022 09:47:09 +0000 (04:47 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 19 Jan 2022 05:02:40 +0000 (00:02 -0500)
As reported by Hongxu Jia:
> The automake-$(APIVERSION) is a hardlink of automake, if it is
> created later than update_mans executing, there is a failure
> [snip]
> |: && mkdir -p doc && ./pre-inst-env /usr/bin/env perl ../automake-1.16.1/doc/help2man --output=doc/aclocal-1.16.1 aclocal-1.16
> |help2man: can't get `--help' info from aclocal-1.16
> |Try `--no-discard-stderr' if option outputs to stderr
> Makefile:3693: recipe for target 'doc/aclocal-1.16.1' failed
> [snip]
>
> The automake_script is required by update_mans and update_mans
> invokes automake-$(APIVERSION) rather than automake to generate
> doc, so we should assign `automake-$(APIVERSION)' to automake_script.
>
> The same reason to tweak aclocal_script.

However, rather than update the _script variables to point to the
hardlinked copies of the programs, we can have the help2man steps
run the existing scripts directly.  This makes the relationship a
bit more explicit and avoids implicit dependencies on names.

* doc/local.mk: Pass $(aclocal_script) and $(automake_script) to $(update_mans).
* THANKS: Add Hongxu Jia.

THANKS
doc/local.mk

diff --git a/THANKS b/THANKS
index 965f280ef7a3ac89c1b9b0939e5465396971791c..a71af5e92cf7a3a2847f54392b761dd09e6134de 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -164,6 +164,7 @@ Henrik Frystyk Nielsen          frystyk@w3.org
 Hib Eris                        hib@hiberis.nl
 Hilko Bengen                    bengen@debian.org
 Holger Hans Peter Freyther      holger@freyther.de
+Hongxu Jia                      hongxu.jia@windriver.com
 Ian Lance Taylor                ian@cygnus.com
 Ignacy Gawedzki                 i@lri.fr
 Илья Н. Голубев                 gin@mo.msk.ru
index a29363d2d71b3e8ab09c7ccccb221c2494e92761..06c78823a57455c77104b4fe406cc0e0cd9ed918 100644 (file)
@@ -46,9 +46,9 @@ update_mans = \
          && echo ".so man1/$$f-$(APIVERSION).1" > $@
 
 %D%/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
-       $(update_mans) aclocal-$(APIVERSION)
+       $(update_mans) $(aclocal_script)
 %D%/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
-       $(update_mans) automake-$(APIVERSION)
+       $(update_mans) $(automake_script)
 
 ## This target is not invoked as a dependency of anything. It exists
 ## merely to make checking the links in automake.texi (that is,