about summary refs log tree commit diff stats
path: root/Makefile
blob: 1b9d287b4b7ed4aac371797d1b9ef4720ec66126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Licensor

NAME = licensor

PREFIX = /usr/local
BIND = $(DESTDIR)$(PREFIX)/bin
BIN = $(BIND)/$(NAME)

.PHONY: help install link uninstall

help:
	@echo "$(NAME) : drop urself a license"
	@echo "(C) 2021--2022 Case Duckworth <acdw@acdw.net>"
	@echo "Licensed under the MIT license; see COPYING for details."
	@echo
	@echo "TARGETS:"
	@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)

link: $(NAME) $(BIND)
	ln -sf $(PWD)/$(NAME) $(BIN)

uninstall:
	rm -f $(BIN)
	rm -rf "$${XDG_CACHE_HOME:-$HOME/.cache}/licensor"