forked from tzmfreedom/hsforce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (29 loc) · 1.01 KB
/
Makefile
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
37
38
.DEFAULT_GOAL=build
.PHONY: help
help: ## Help about this makefile's targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-18s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build: hpack ## Compiles all modules in the project
cabal new-build
.PHONY: test
test: hpack ## Runs all tests in the project
cabal new-test --test-show-details=streaming
.PHONY: repl
repl: hpack ## Opens a REPL, loading this project's modules
cabal new-repl
.PHONY: clean
clean: hpack ## Cleans stored packages and removes temp files
cabal new-clean
.PHONY: hpack
hpack: ## Regenerates the .cabal files, usually called implicitly
@hpack
.PHONY: distclean
distclean: ## Delete all files and directories untracked by git
git clean -fdx .
.PHONY: pre-commit
pre-commit: ## Lints and formats modified sources
pre-commit run
.PHONY: hoogle
hoogle: ## Starts local hoogle server
@hoogle server --local || echo "Please enable hoogle settings in shell.nix, see comments there!"