From bb748f0e002c8a4f9865ae0a592fcb4fac0aabc7 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 10 Feb 2023 03:44:18 +0000 Subject: Fix symlink installation dependency rule Signed-off-by: Laurent Bercot --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 82f380f..0fc3d40 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,12 @@ $(LIBEXEC_TARGETS:%=$(DESTDIR)$(libexecdir)/%) $(BIN_TARGETS:%=$(DESTDIR)$(bindi if [ x$$og != x ] ; then og="-O $${og}" ; fi && \ $(INSTALL) -D -m $$mode $$og $< $@ ; } -$(BIN_SYMLINKS:%=$(DESTDIR)$(bindir)/%): $(BIN_SYMLINKS:%=$(DESTDIR)$(bindir)/$(SYMLINK_TARGET_%)) +define install_symlink_rule +$(DESTDIR)$(bindir)/$(1): $(DESTDIR)$(bindir)/$$(SYMLINK_TARGET_$(1)) +endef + +$(foreach x,$(BIN_SYMLINKS),$(eval $(call install_symlink_rule,$(x)))) +$(BIN_SYMLINKS:%=$(DESTDIR)$(bindir)/%): exec $(INSTALL) -l $(SYMLINK_TARGET_$(@F)) $@ $(DESTDIR)$(libdir)/lib%.a: lib%.a.xyzzy -- cgit 1.4.1