diff options
-rw-r--r-- | Makefile | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/Makefile b/Makefile index cca469c..1b9d287 100644 --- a/Makefile +++ b/Makefile | |||
@@ -1,20 +1,33 @@ | |||
1 | # licenser | 1 | # Licensor |
2 | |||
3 | NAME = licensor | ||
2 | 4 | ||
3 | PREFIX = /usr/local | 5 | PREFIX = /usr/local |
6 | BIND = $(DESTDIR)$(PREFIX)/bin | ||
7 | BIN = $(BIND)/$(NAME) | ||
4 | 8 | ||
5 | .PHONY: help install uninstall | 9 | .PHONY: help install link uninstall |
6 | 10 | ||
7 | help: | 11 | help: |
8 | @echo "licensor : drop urself a license" | 12 | @echo "$(NAME) : drop urself a license" |
9 | @echo "(C) 2021--2022 Case Duckworth <acdw@acdw.net>" | 13 | @echo "(C) 2021--2022 Case Duckworth <acdw@acdw.net>" |
14 | @echo "Licensed under the MIT license; see COPYING for details." | ||
10 | @echo | 15 | @echo |
11 | @echo "TARGETS:" | 16 | @echo "TARGETS:" |
12 | @echo " install Install licensor to $(DESTDIR)$(PREFIX)/bin/licensor." | 17 | @echo " install Install $(NAME) to $(BIN)." |
13 | @echo " uninstall Uninstall licensor-related files." | 18 | @echo " link Install $(NAME) using symlinks." |
19 | @echo " Probably only useful for development." | ||
20 | @echo " uninstall Uninstall $(NAME)-related files." | ||
21 | |||
22 | $(BIND): | ||
23 | mkdir -p $@ | ||
24 | |||
25 | install: $(NAME) | ||
26 | install -D $< $(BIND) | ||
14 | 27 | ||
15 | install: licensor | 28 | link: $(NAME) $(BIND) |
16 | install -D $< $(DESTDIR)$(PREFIX)/bin | 29 | ln -sf $(PWD)/$(NAME) $(BIN) |
17 | 30 | ||
18 | uninstall: | 31 | uninstall: |
19 | rm -f $(DESTDIR)$(PREFIX)/bin/licensor | 32 | rm -f $(BIN) |
20 | rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/licensor" | 33 | rm -rf "$${XDG_CACHE_HOME:-$HOME/.cache}/licensor" |