-
Notifications
You must be signed in to change notification settings - Fork 398
/
Copy pathMakefile
68 lines (58 loc) · 2.04 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
.PHONY: help
help:
@echo "Available make commands:"
@cat Makefile | grep '^[a-z][^:]*:' | grep -v 'install_' | cut -d: -f1 | sort | sed 's/^/ /'
rundep=go run -modfile misc/devdeps/go.mod
.PHONY: install
install: install.gnokey install.gno
@if ! command -v gnodev > /dev/null; then \
echo ------------------------------; \
echo "For local realm development, gnodev is recommended: https://docs.gno.land/gno-tooling/cli/gno-tooling-gnodev"; \
echo "You can install it by calling 'make install.gnodev'"; \
fi
# shortcuts to frequently used commands from sub-components.
.PHONY: install.gnokey
install.gnokey:
$(MAKE) --no-print-directory -C ./gno.land install.gnokey
@echo "[+] 'gnokey' is installed. more info in ./gno.land/."
.PHONY: install.gno
install.gno:
$(MAKE) --no-print-directory -C ./gnovm install
@echo "[+] 'gno' is installed. more info in ./gnovm/."
.PHONY: install.gnodev
install.gnodev:
$(MAKE) --no-print-directory -C ./contribs install.gnodev
@echo "[+] 'gnodev' is installed."
# old aliases
.PHONY: install_gnokey
install_gnokey: install.gnokey
.PHONY: install_gno
install_gno: install.gno
.PHONY: test
test: test.components test.docker
.PHONY: test.components
test.components:
$(MAKE) --no-print-directory -C tm2 test
$(MAKE) --no-print-directory -C gnovm test
$(MAKE) --no-print-directory -C gno.land test
$(MAKE) --no-print-directory -C examples test
$(MAKE) --no-print-directory -C misc test
.PHONY: test.docker
test.docker:
@if hash docker 2>/dev/null; then \
go test --tags=docker -count=1 -v ./misc/docker-integration; \
else \
echo "[-] 'docker' is missing, skipping ./misc/docker-integration tests."; \
fi
.PHONY: fmt
fmt:
$(MAKE) --no-print-directory -C tm2 fmt imports
$(MAKE) --no-print-directory -C gnovm fmt imports
$(MAKE) --no-print-directory -C gno.land fmt imports
$(MAKE) --no-print-directory -C examples fmt
.PHONY: lint
lint:
$(rundep) github.com/golangci/golangci-lint/cmd/golangci-lint run --config .github/golangci.yml
.PHONY: tidy
tidy:
$(MAKE) --no-print-directory -C misc tidy