about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-02-10 03:44:18 +0000
committerLaurent Bercot <ska@appnovation.com>2023-02-10 03:44:18 +0000
commitbb748f0e002c8a4f9865ae0a592fcb4fac0aabc7 (patch)
tree6b75bd7a075affb2d775829feb1a3b8549e0127d
parent9c2bebec16aafefb9067c1db83ef3c765e13610b (diff)
downloadexecline-bb748f0e002c8a4f9865ae0a592fcb4fac0aabc7.tar.gz
execline-bb748f0e002c8a4f9865ae0a592fcb4fac0aabc7.tar.xz
execline-bb748f0e002c8a4f9865ae0a592fcb4fac0aabc7.zip
Fix symlink installation dependency rule
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
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