Skip to content

Commit

Permalink
Fix gmake 4.4 "pattern recipe did not update peer target" warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
daviesrob authored and pd3 committed Oct 22, 2024
1 parent 4735097 commit 4f8bf53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f8bf53

Please sign in to comment.