forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (54 loc) · 2.13 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.PHONY: help
help:
@echo "Available make commands:"
@cat Makefile | grep '^[a-z][^:]*:' | cut -d: -f1 | sort | sed 's/^/ /'
rundep=go run -modfile ../misc/devdeps/go.mod
gnoland.start:
@#TODO: remove this makefile directive in a few weeks.
@echo "DEPRECATED: use 'start.gnoland' instead of 'gnoland.start'"
go run ./cmd/gnoland start
.PHONY: start.gnoland
start.gnoland:; go run ./cmd/gnoland start
.PHONY: start.gnoweb
start.gnoweb:; go run ./cmd/gnoweb
.PHONY: build
build: build.gnoland build.gnokey build.gnoweb build.gnofaucet build.gnotxsync build.genesis
build.gnoland:; go build -o build/gnoland ./cmd/gnoland
build.gnoweb:; go build -o build/gnoweb ./cmd/gnoweb
build.gnofaucet:; go build -o build/gnofaucet ./cmd/gnofaucet
build.gnokey:; go build -o build/gnokey ./cmd/gnokey
build.gnotxsync:; go build -o build/gnotxsync ./cmd/gnotxsync
build.genesis:; go build -o build/genesis ./cmd/genesis
run.gnoland:; go run ./cmd/gnoland start
run.gnoweb:; go run ./cmd/gnoweb
.PHONY: install
install: install.gnoland install.gnoweb install.gnofaucet install.gnokey install.gnotxsync install.genesis
install.gnoland:; go install ./cmd/gnoland
install.gnoweb:; go install ./cmd/gnoweb
install.gnofaucet:; go install ./cmd/gnofaucet
install.gnokey:; go install ./cmd/gnokey
install.gnotxsync:; go install ./cmd/gnotxsync
install.genesis:; go install ./cmd/genesis
.PHONY: fclean
fclean: clean
rm -rf testdir
.PHONY: clean
clean:
rm -rf build
.PHONY: lint
lint:
$(rundep) github.com/golangci/golangci-lint/cmd/golangci-lint run --config ../.github/golangci.yml ./...
.PHONY: fmt
GOFMT_FLAGS ?= -w
fmt:
$(rundep) mvdan.cc/gofumpt $(GOFMT_FLAGS) .
########################################
# Test suite
.PHONY: test
test: _test.gnoland _test.gnoweb _test.gnokey _test.pkgs
GOTEST_FLAGS ?= -v -p 1 -timeout=30m
_test.gnoland:; go test $(GOTEST_FLAGS) ./cmd/gnoland
_test.gnoweb:; go test $(GOTEST_FLAGS) ./cmd/gnoweb
_test.gnokey:; go test $(GOTEST_FLAGS) ./cmd/gnokey
_test.pkgs:; go test $(GOTEST_FLAGS) ./pkg/...
_test.pkgs.sync:; UPDATE_SCRIPTS=true go test $(GOTEST_FLAGS) ./pkg/...