-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (28 loc) · 760 Bytes
/
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
39
40
41
42
43
44
# -*- mode: Makefile-gmake -*-
SHELL := bash
TOP_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
BUILD_DIR := build
COVERAGE_DIR := $(BUILD_DIR)/coverage
DIAGRAMS := doc/diagram/auxiliary.png
SHISA_PKGS := $(shell go list ./... | grep -Ev 'test')
SHISA_TEST_PKGS := $(addprefix coverage/,$(SHISA_PKGS))
all: test
$(BUILD_DIR):
@mkdir -p $@
$(COVERAGE_DIR):
@mkdir -p $@
clean:
rm -rf $(BUILD_DIR)
fmt:
go fmt ./...
vet:
go vet ./...
gen:
find . -name '*_charlatan.go' | xargs rm
go generate ./...
test: ${COVERAGE_DIR} ${SHISA_TEST_PKGS}
coverage/%:
go test -v -coverprofile=$(TOP_DIR)/$(COVERAGE_DIR)/$(@F)_coverage.out -covermode=atomic github.com/shisa-platform/core/$(@F)
t:
echo $(SHISA_PKGS)
.PHONY: clean doc vet fmt test