diff options
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..65e2dca --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,35 @@ | |||
1 | NAME=HT | ||
2 | DESC=a bespoke web publishing system | ||
3 | |||
4 | DESTDIR= | ||
5 | PREFIX=/usr/local | ||
6 | |||
7 | BIND=$(DESTDIR)$(PREFIX)/bin | ||
8 | |||
9 | .PHONY: help | ||
10 | help: | ||
11 | @echo "$(NAME): $(DESC)" | ||
12 | @echo "Copyright (C) 2022 Case Duckworth <acdw@acdw.net>" | ||
13 | @echo | ||
14 | @echo "TARGETS:" | ||
15 | @echo " install Install $(NAME) to $(DESTDIR)$(PREFIX)." | ||
16 | @echo " link Install using symlinks for easier development." | ||
17 | @echo " uninstal Uninstall $(NAME) from $(DESTDIR)$(PREFIX)." | ||
18 | |||
19 | $(BIND): | ||
20 | mkdir -p $@ | ||
21 | |||
22 | .PHONY: install | ||
23 | install: ht ht.awk | ||
24 | install -t $(BIND) $? | ||
25 | |||
26 | .PHONY: link | ||
27 | link: $(BIND) | ||
28 | ln -sf $(PWD)/ht $(BIND)/ht | ||
29 | ln -sf $(PWD)/ht.awk $(BIND)/ht.awk | ||
30 | |||
31 | .PHONY: uninstall | ||
32 | uninstall: | ||
33 | rm $(BIND)/ht $(BIND)/ht.awk | ||
34 | |||
35 | |||