summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2022-10-03 23:33:19 -0400
committerAndrew Cady <d@jerkface.net>2022-10-03 23:33:52 -0400
commit5857d01a6badd38f9a216d090b047474b19569c3 (patch)
tree30de41b1c6b40669c82746f3c12daac54e62fdf9 /Makefile
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..92becce
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
1stack_path != which stack
2
3all: $(if $(stack_path),,install-stack)
4 stack build
5 ln -sfT $$(stack path --local-install-root)/bin ./bin
6
7.PHONY: all run install install-dev-tools
8
9run: all
10 ./bin/repgoal
11
12install:
13 stack install
14
15install-dev-tools:
16 stack install apply-refact hlint stylish-haskell hasktags hoogle
17
18become_root != [ "$$(id -u)" = 0 ] || echo sudo
19install-stack:
20ifneq (,$(shell which curl))
21 curl -sSL https://get.haskellstack.org/ | sh
22else
23ifneq (,$(shell which wget))
24 wget -qO- https://get.haskellstack.org/ | sh
25else
26ifneq (,$(shell which apt))
27 $(become_root) apt install haskell-stack
28else
29 $(error No stack binary found; and no known means of installing (no curl, wget, or apt).\
30 Follow instructions at <https://haskellstack.org>)
31endif
32endif
33endif
34
35%.html: %.md
36 pandoc -f markdown -t html -o $@ $^