run check in parallel and fix a concurrent build issue

This commit is contained in:
panxiaohe 2021-04-19 19:50:52 +08:00
parent 5e6e35bcb0
commit 393cbf00da
2 changed files with 44 additions and 2 deletions

View File

@ -0,0 +1,34 @@
From 541943ee04ee22101bbbde2386272b1cad635132 Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim.demaille@gmail.com>
Date: Sun, 6 Sep 2020 10:08:22 +0200
Subject: [PATCH] build: fix a concurrent build issue in examples
Reported by Thomas Deutschmann <whissi@gentoo.org>.
https://lists.gnu.org/r/bug-bison/2020-09/msg00010.html
* examples/c/lexcalc/local.mk: scan.o depends on parse.[ch].
---
examples/c/lexcalc/local.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/examples/c/lexcalc/local.mk b/examples/c/lexcalc/local.mk
index b73887e..636275c 100644
--- a/examples/c/lexcalc/local.mk
+++ b/examples/c/lexcalc/local.mk
@@ -31,6 +31,13 @@ endif FLEX_WORKS
%D%/parse.c: $(dependencies)
+# Tell Make scan.o depends on parse.h, except that Make sees only
+# parse.c, not parse.h. We can't use BUILT_SOURCES to this end, since
+# we use the built bison.
+%D%/lexcalc$(DASH)scan.o: %D%/parse.c
+# Likewise, but for Automake before 1.16.
+%D%/examples_c_lexcalc_lexcalc$(DASH)scan.o: %D%/parse.c
+
EXTRA_DIST += %D%/lexcalc.test
dist_lexcalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
CLEANFILES += %D%/parse.[ch] %D%/scan.c %D%/parse.output
--
1.8.3.1

View File

@ -1,10 +1,11 @@
Name: bison
Version: 3.6.4
Release: 1
Release: 2
Summary: A GNU general-purpose parser generator
License: GPLv3+
URL: http://www.gnu.org/software/bison/
Source0: https://ftp.gnu.org/gnu/bison/bison-%{version}.tar.xz
Patch0: backport-build-fix-a-concurrent-build-issue-in-examples.patch
BuildRequires: gcc-c++ autoconf automake m4 flex
Requires(post): info
@ -45,7 +46,7 @@ This package contains language support files and locale.
%make_build
%check
make check
%make_build check
%install
%make_install
@ -89,6 +90,13 @@ fi
%{_datadir}/locale/*/LC_MESSAGES/bison-gnulib.mo
%changelog
* Mon Apr 19 2021 panxiaohe <panxiaohe@huawei.com> - 3.6.4-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:use make macros to run check in parallel;
fix a concurrent build issue in examples
* Thu Aug 20 2020 SimpleUpdate Robot <tc@openeuler.org> - 3.6.4-1
- Upgrade to version 3.6.4