git.iko.soy/typeable/rollbar-hs
on master help sign in
Add a Makefile

We can make things easier on contributors if we setup a build system. We can also make CI easier if we use Make.

commita53fe52f0930e572fb41fa70980958e31b2a87e8 authorjoneshf <jones3.hardy@gmail.com> dateTue 24 Jul 2018, 23:07 (8 years ago) parent9de1efa
2 files changed+37
.gitignore+2 Makefile+35
.gitignore+2
@@ -1,6 +1,8 @@
11### Project specific ###
22
33*.cabal
4+.make
5+bin
46
57# Created by https://www.gitignore.io/api/vim,osx,linux,macos,emacs,windows,haskell,visualstudiocode
68
Makefilenew file+35
@@ -0,0 +1,35 @@
1+BIN := bin
2+EMPTY := .make
3+GHCID := $(BIN)/ghcid
4+STACK := stack
5+STACK_WORK := .stack-work
6+
7+.DEFAULT_GOAL := build
8+
9+$(EMPTY):
10+ mkdir $@
11+
12+$(EMPTY)/stack-setup: | $(EMPTY)
13+ $(STACK) setup
14+ touch $@
15+
16+$(GHCID): $(EMPTY)/stack-setup
17+ $(STACK) install ghcid --local-bin-path $(BIN)
18+
19+.PHONY: build
20+build: $(EMPTY)/stack-setup
21+ $(STACK) build --no-run-tests --test
22+
23+.PHONY: clean
24+clean:
25+ rm -f $(BIN)/*
26+ rm -f $(EMPTY)/*
27+ rm -fr $(STACK_WORK)
28+
29+.PHONY: test
30+test: build
31+ $(STACK) test
32+
33+.PHONY: watch
34+watch: $(GHCID)
35+ $(GHCID)