From 4f8bf53988911c3e905683e3d48d763e3395622b Mon Sep 17 00:00:00 2001 From: Rob Davies Date: Mon, 21 Oct 2024 15:28:38 +0100 Subject: [PATCH] Fix gmake 4.4 "pattern recipe did not update peer target" warnings Due to an upcoming change in how GNU make will handle pattern rules with multiple targets, GNU make 4.4 warns when pattern recipies don't update all targets listed. See https://lists.gnu.org/archive/html/help-make/2022-10/msg00020.html for more information. Such a case existed in bcftools' Makefile in a rule intended to make either .dll or .cygdll targets depending on the value of the PLUGIN_EXT variable. As PLUGIN_EXT could also be .so (handled by another rule) the easiest solution is to spilt the single rule into two, each having a single pattern target. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 27738bef..ffead3ec 100644 --- a/Makefile +++ b/Makefile @@ -196,7 +196,10 @@ libbcftools.a: $(OBJS) vcfplugin.o: EXTRA_CPPFLAGS += -DPLUGINPATH='"$(pluginpath)"' -%.dll %.cygdll: %.c version.h version.c libbcftools.a $(HTSLIB_DLL) +%.dll: %.c version.h version.c libbcftools.a $(HTSLIB_DLL) + $(CC) $(PLUGIN_FLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(EXTRA_CPPFLAGS) $(LDFLAGS) -o $@ version.c $< $(PLUGIN_LIBS) + +%.cygdll: %.c version.h version.c libbcftools.a $(HTSLIB_DLL) $(CC) $(PLUGIN_FLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(EXTRA_CPPFLAGS) $(LDFLAGS) -o $@ version.c $< $(PLUGIN_LIBS) %.so: %.c version.h version.c