1From b952d7064c9cee23857fbc7cb9d761542b98d59a Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 26 Jul 2018 00:58:12 -0700
4Subject: [PATCH 3/6] build: fix race in parallel builds
5
6The automake-$(APIVERSION) is a hardlink of automake, if it is
7created later than update_mans executing, there is a failure
8[snip]
9|: && mkdir -p doc && ./pre-inst-env /usr/bin/env perl
10../automake-1.16.1/doc/help2man --output=doc/aclocal-1.16.1
11aclocal-1.16
12|help2man: can't get `--help' info from aclocal-1.16
13|Try `--no-discard-stderr' if option outputs to stderr
14Makefile:3693: recipe for target 'doc/aclocal-1.16.1' failed
15[snip]
16
17The automake_script is required by update_mans and update_mans
18invokes automake-$(APIVERSION) rather than automake to generate
19doc, so we should assign `automake-$(APIVERSION)' to automake_script.
20
21The same reason to tweak aclocal_script.
22
23* bin/local.mk: correct automake_script/aclocal_script
24
25Upstream-Status: Submitted [automake-patches@gnu.org]
26
27Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
28---
29 Makefile.in  | 4 ++--
30 bin/local.mk | 4 ++--
31 2 files changed, 4 insertions(+), 4 deletions(-)
32
33diff --git a/Makefile.in b/Makefile.in
34index a919544..c0f8c0d 100644
35--- a/Makefile.in
36+++ b/Makefile.in
37@@ -723,8 +723,8 @@ bin_SCRIPTS = bin/automake bin/aclocal
38 # Used by maintainer checks and such.
39 automake_in = $(srcdir)/bin/automake.in
40 aclocal_in = $(srcdir)/bin/aclocal.in
41-automake_script = bin/automake
42-aclocal_script = bin/aclocal
43+automake_script = bin/automake-$(APIVERSION)
44+aclocal_script  = bin/aclocal-$(APIVERSION)
45 AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
46 info_TEXINFOS = doc/automake.texi doc/automake-history.texi
47 doc_automake_TEXINFOS = doc/fdl.texi
48diff --git a/bin/local.mk b/bin/local.mk
49index 4232448..8f043b0 100644
50--- a/bin/local.mk
51+++ b/bin/local.mk
52@@ -31,8 +31,8 @@ CLEANFILES += \
53 # Used by maintainer checks and such.
54 automake_in = $(srcdir)/%D%/automake.in
55 aclocal_in  = $(srcdir)/%D%/aclocal.in
56-automake_script = %D%/automake
57-aclocal_script  = %D%/aclocal
58+automake_script = %D%/automake-$(APIVERSION)
59+aclocal_script  = %D%/aclocal-$(APIVERSION)
60
61 AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
62 TAGS_FILES += $(AUTOMAKESOURCES)
63--
642.39.2
65
66