From b96c8f61c877871551aae2c5613a2404210ea99e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 7 Jul 2022 21:21:19 -0500 Subject: Update Makefile --- Makefile | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index cca469c..1b9d287 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,33 @@ -# licenser +# Licensor + +NAME = licensor PREFIX = /usr/local +BIND = $(DESTDIR)$(PREFIX)/bin +BIN = $(BIND)/$(NAME) -.PHONY: help install uninstall +.PHONY: help install link uninstall help: - @echo "licensor : drop urself a license" + @echo "$(NAME) : drop urself a license" @echo "(C) 2021--2022 Case Duckworth " + @echo "Licensed under the MIT license; see COPYING for details." @echo @echo "TARGETS:" - @echo " install Install licensor to $(DESTDIR)$(PREFIX)/bin/licensor." - @echo " uninstall Uninstall licensor-related files." + @echo " install Install $(NAME) to $(BIN)." + @echo " link Install $(NAME) using symlinks." + @echo " Probably only useful for development." + @echo " uninstall Uninstall $(NAME)-related files." + +$(BIND): + mkdir -p $@ + +install: $(NAME) + install -D $< $(BIND) -install: licensor - install -D $< $(DESTDIR)$(PREFIX)/bin +link: $(NAME) $(BIND) + ln -sf $(PWD)/$(NAME) $(BIN) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/licensor - rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/licensor" + rm -f $(BIN) + rm -rf "$${XDG_CACHE_HOME:-$HOME/.cache}/licensor" -- cgit 1.4.1-21-gabe81