-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (72 loc) · 2.92 KB
/
Makefile
File metadata and controls
88 lines (72 loc) · 2.92 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/make -f
# Main Makefile with modular includes
# All variables and targets are now organized in the make/ directory
# Include all modular makefiles
include make/build.mk
include make/test.mk
include make/coverage.mk
include make/proto.mk
include make/lint.mk
# The below include contains the tools and runsim targets.
include contrib/devtools/Makefile
################################################################################
### Core Targets ###
################################################################################
# Default targets
all: install lint test
################################################################################
### Tools & Dependencies ###
################################################################################
go-mod-cache: go.sum
@echo "--> Download go modules to local cache"
@go mod download
go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@go mod verify
draw-deps:
@# requires brew install graphviz or apt-get install graphviz
go install github.com/RobotsAndPencils/goviz@latest
@goviz -i ./cmd/xiond -d 2 | dot -Tpng -o dependency-graph.png
clean:
rm -rf snapcraft-local.yaml build/
distclean: clean
rm -rf vendor/
guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
################################################################################
### Help Target ###
################################################################################
help:
@echo "Xion - Blockchain Development Toolkit"
@echo ""
@echo "Common targets:"
@$(MAKE) --no-print-directory help-build-brief
@$(MAKE) --no-print-directory help-test-brief
@$(MAKE) --no-print-directory help-coverage-brief
@$(MAKE) --no-print-directory help-proto-brief
@$(MAKE) --no-print-directory help-lint-brief
@echo " clean Clean build artifacts"
@echo ""
@echo "Use 'make help-full' for complete list of targets"
help-full:
@echo "Xion - Blockchain Development Toolkit"
@echo "======================================"
@echo ""
@$(MAKE) --no-print-directory help-build
@$(MAKE) --no-print-directory help-test
@$(MAKE) --no-print-directory help-coverage
@$(MAKE) --no-print-directory help-proto
@$(MAKE) --no-print-directory help-lint
@echo "Development targets:"
@echo " go-mod-cache Download go modules to cache"
@echo " draw-deps Generate dependency graph"
@echo ""
@echo "Utility targets:"
@echo " clean Clean build artifacts"
@echo " distclean Deep clean (includes vendor/)"
@echo " help Show brief help"
@echo " help-full Show this complete help"
.PHONY: all go-mod-cache draw-deps clean distclean help help-full