about summary refs log tree commit diff stats
path: root/Makefile
blob: b6efa170f8b9bbe690ebc659c4fa6fe5a1078836 (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
34
35
36
NAME = shin
DESC = Include shell scripts in other shell scripts

INSTALLED = shin shinb

DESTDIR =
PREFIX = /usr/local

BIN = $(DESTDIR)$(PREFIX)/bin

.PHONY: help
help:
	@echo "$(NAME) : $(DESC)"
	@echo "(C) 2022 Case Duckworth <acdw@acdw.net>"
	@echo "Licensed under the Fair 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."

.PHONY: install
install: $(INSTALLED)
	install -Dt $(BIN) $?

.PHONY: link
link: $(NAME) shinb $(BIN)
	ln -sf $(PWD)/$(NAME) $(PWD)/shinb $(BIN)

.PHONY: uninstall
uninstall:
	rm $(BIN)

$(BIN):
	mkdir -p $(BIN)