summary refs log tree commit diff stats
path: root/Makefile
blob: 65e2dcaf53424328112453de12d2f071d17c6669 (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
NAME=HT
DESC=a bespoke web publishing system

DESTDIR=
PREFIX=/usr/local

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

.PHONY: help
help:
	@echo "$(NAME): $(DESC)"
	@echo "Copyright (C) 2022 Case Duckworth <acdw@acdw.net>"
	@echo
	@echo "TARGETS:"
	@echo " install	Install $(NAME) to $(DESTDIR)$(PREFIX)."
	@echo " link		Install using symlinks for easier development."
	@echo " uninstal	Uninstall $(NAME) from $(DESTDIR)$(PREFIX)."

$(BIND):
	mkdir -p $@

.PHONY: install
install: ht ht.awk
	install -t $(BIND) $?

.PHONY: link
link: $(BIND)
	ln -sf $(PWD)/ht $(BIND)/ht
	ln -sf $(PWD)/ht.awk $(BIND)/ht.awk

.PHONY: uninstall
uninstall:
	rm $(BIND)/ht $(BIND)/ht.awk