forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (53 loc) · 1.75 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
.PHONY: help
help:
@echo "Available make commands:"
@cat Makefile | grep '^[a-z][^:]*:' | cut -d: -f1 | sort | sed 's/^/ /'
# command to run dependency utilities, like goimports.
rundep=go run -modfile ../misc/devdeps/go.mod
########################################
# Environment variables
# You can overwrite any of the following by passing a different value on the
# command line, ie. `CGO_ENABLED=1 make test`.
# disable cgo by default. cgo requires some additional dependencies in some
# cases, and is not strictly required by any tm2 code.
CGO_ENABLED ?= 0
export CGO_ENABLED
# flags for `make fmt`. -w will write the result to the destination files.
GOFMT_FLAGS ?= -w
# flags for `make imports`.
GOIMPORTS_FLAGS ?= $(GOFMT_FLAGS)
# test suite flags.
GOTEST_FLAGS ?= -v -p 1 -timeout=30m
# Official packages (non-overridable): more reliable and tested modules, distinct from the experimentation area.
OFFICIAL_PACKAGES = ./gno.land/p
OFFICIAL_PACKAGES += ./gno.land/r/demo
OFFICIAL_PACKAGES += ./gno.land/r/gnoland
OFFICIAL_PACKAGES += ./gno.land/r/sys
OFFICIAL_PACKAGES += ./gno.land/r/gov
########################################
# Dev tools
.PHONY: transpile
transpile:
go run ../gnovm/cmd/gno transpile -v .
.PHONY: build
build:
go run ../gnovm/cmd/gno transpile -v --gobuild .
.PHONY: test
test:
go run ../gnovm/cmd/gno test -v ./...
.PHONY: lint
lint:
go run ../gnovm/cmd/gno lint -v $(OFFICIAL_PACKAGES)
.PHONY: test.sync
test.sync:
go run ../gnovm/cmd/gno test -v --update-golden-tests ./...
.PHONY: clean
clean:
find . \( -name "*.gno.gen.go" -or -name ".*.gno.gen_test.go" \) -delete
.PHONY: fmt
GNOFMT_FLAGS ?= -w
fmt:
go run ../gnovm/cmd/gno fmt $(GNOFMT_FLAGS) ./...
.PHONY: tidy
tidy:
go run github.com/gnolang/gno/gnovm/cmd/gno mod tidy -v --recursive