From 3b2fad928b6eeb43ae268810a176acbd6c73a722 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Sat, 29 Feb 2020 17:37:26 +0100 Subject: [PATCH] Makefile: create "lsbtr" symlink on "install" build target --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b8e5072..8b54563 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ # BIN = btrbk +BIN_LINKS = lsbtr CONFIGS = btrbk.conf.example DOCS = ChangeLog \ README.md @@ -46,13 +47,19 @@ replace_vars = sed \ all: man -install: install-bin install-etc install-systemd install-share install-man install-doc +install: install-bin install-bin-links install-etc install-systemd install-share install-man install-doc install-bin: @echo 'installing binary...' install -d -m 755 "$(DESTDIR)$(BINDIR)" install -p -m 755 $(BIN) "$(DESTDIR)$(BINDIR)" +install-bin-links: + @echo 'installing symlinks...' + for name in $(BIN_LINKS); do \ + ln -s -n -f $(BIN) "$(DESTDIR)$(BINDIR)/$$name"; \ + done + install-etc: @echo 'installing example configs...' install -d -m 755 "$(DESTDIR)$(CONFDIR)/btrbk"