mirror of
https://github.com/typeable/rollbar-hs.git
synced 2024-09-11 05:35:27 +03:00
We can make things easier on contributors if we setup a build system. We can also make CI easier if we use Make.
36 lines
515 B
Makefile
36 lines
515 B
Makefile
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)
|