mirror of
https://github.com/typeable/rollbar-hs.git
synced 2024-09-11 05:35:27 +03:00
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.
This commit is contained in:
parent
9de1efa855
commit
a53fe52f09
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,8 @@
|
||||
### Project specific ###
|
||||
|
||||
*.cabal
|
||||
.make
|
||||
bin
|
||||
|
||||
# Created by https://www.gitignore.io/api/vim,osx,linux,macos,emacs,windows,haskell,visualstudiocode
|
||||
|
||||
|
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
BIN := bin
|
||||
EMPTY := .make
|
||||
GHCID := $(BIN)/ghcid
|
||||
STACK := stack
|
||||
STACK_WORK := .stack-work
|
||||
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
$(EMPTY):
|
||||
mkdir $@
|
||||
|
||||
$(EMPTY)/stack-setup: | $(EMPTY)
|
||||
$(STACK) setup
|
||||
touch $@
|
||||
|
||||
$(GHCID): $(EMPTY)/stack-setup
|
||||
$(STACK) install ghcid --local-bin-path $(BIN)
|
||||
|
||||
.PHONY: build
|
||||
build: $(EMPTY)/stack-setup
|
||||
$(STACK) build --no-run-tests --test
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(BIN)/*
|
||||
rm -f $(EMPTY)/*
|
||||
rm -fr $(STACK_WORK)
|
||||
|
||||
.PHONY: test
|
||||
test: build
|
||||
$(STACK) test
|
||||
|
||||
.PHONY: watch
|
||||
watch: $(GHCID)
|
||||
$(GHCID)
|
Loading…
Reference in New Issue
Block a user