Potential fix for parallel builds failure of mingw subpackage

This commit is contained in:
Richard W.M. Jones 2024-01-23 18:12:47 +00:00
parent cf7389fcdd
commit 2fd0615d12
4 changed files with 51 additions and 2 deletions

View File

@ -1,7 +1,7 @@
From 93a1538808ac7f9788336a7e35168d851e8b2c72 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 23 Jan 2024 13:24:48 +0000
Subject: [PATCH 1/2] common/bitmaps: Fix tests when srcdir != builddir
Subject: [PATCH 1/3] common/bitmaps: Fix tests when srcdir != builddir
---
common/bitmap/Makefile.am | 1 +

View File

@ -1,7 +1,7 @@
From ac60163ceba1b951e1d2f0625552e6a45d85f666 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 23 Jan 2024 13:35:02 +0000
Subject: [PATCH 2/2] tests: Fix tests to work with srcdir != builddir
Subject: [PATCH 2/3] tests: Fix tests to work with srcdir != builddir
---
tests/test-cc-cpp.sh | 2 +-

View File

@ -0,0 +1,48 @@
From 774465bb9e3444f23709deabeb39cc91490001a5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 23 Jan 2024 18:08:12 +0000
Subject: [PATCH 3/3] common/replacements/win32: Only build nbdkit-cat.mc
derived files once
Previously parallel builds caused multiple instances of windmc to run.
Use a stamp file to avoid this.
---
common/replacements/win32/Makefile.am | 9 +++++++--
.gitignore | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/common/replacements/win32/Makefile.am b/common/replacements/win32/Makefile.am
index 9b5a68db0..b8c7c639e 100644
--- a/common/replacements/win32/Makefile.am
+++ b/common/replacements/win32/Makefile.am
@@ -38,8 +38,13 @@ if IS_WINDOWS
# Build the message catalog.
noinst_DATA = MSG00001.bin nbdkit-cat.h nbdkit-cat.rc
-$(noinst_DATA): nbdkit-cat.mc
- rm -f $@
+CLEANFILES += stamp-data
+
+$(noinst_DATA): stamp-data
+
+stamp-data: nbdkit-cat.mc
+ rm -f $@ $(noinst_DATA)
$(MC) $<
+ touch $@
endif
diff --git a/.gitignore b/.gitignore
index 04fdcd723..14f816c93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,7 @@ plugins/*/*.3
/common/replacements/win32/MSG00001.bin
/common/replacements/win32/nbdkit-cat.h
/common/replacements/win32/nbdkit-cat.rc
+/common/replacements/win32/stamp-data
/common/utils/test-quotes
/common/utils/test-vector
/common/utils/windows-errors.c
--
2.43.0

View File

@ -92,6 +92,7 @@ Source8: %{modulename}.fc
# Upstream patches to fix srcdir != builddir
Patch: 0001-common-bitmaps-Fix-tests-when-srcdir-builddir.patch
Patch: 0002-tests-Fix-tests-to-work-with-srcdir-builddir.patch
Patch: 0003-common-replacements-win32-Only-build-nbdkit-cat.mc-d.patch
BuildRequires: make
%if 0%{patches_touch_autotools}