nbdkit/0003-common-replacements-win32-Only-build-nbdkit-cat.mc-d.patch

49 lines
1.4 KiB
Diff

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