|
1 | 1 | ################################################################################ |
2 | 2 |
|
3 | | -# This Makefile generated by GoMakeGen 1.5.1 using next command: |
| 3 | +# This Makefile generated by GoMakeGen 2.0.0 using next command: |
4 | 4 | # gomakegen --mod . |
5 | 5 | # |
6 | 6 | # More info: https://kaos.sh/gomakegen |
|
9 | 9 |
|
10 | 10 | export GO111MODULE=on |
11 | 11 |
|
| 12 | +ifdef VERBOSE ## Print verbose information (Flag) |
| 13 | +VERBOSE_FLAG = -v |
| 14 | +endif |
| 15 | + |
| 16 | +################################################################################ |
| 17 | + |
12 | 18 | .DEFAULT_GOAL := help |
13 | | -.PHONY = fmt vet all clean deps mod-init mod-update mod-vendor help |
| 19 | +.PHONY = fmt vet all clean deps update init vendor mod-init mod-update mod-download mod-vendor help |
14 | 20 |
|
15 | 21 | ################################################################################ |
16 | 22 |
|
17 | 23 | all: sslcli ## Build all binaries |
18 | 24 |
|
19 | | -sslcli: ## Build sslcli binary |
20 | | - go build sslcli.go |
| 25 | +sslcli: |
| 26 | + go build $(VERBOSE_FLAG) sslcli.go |
21 | 27 |
|
22 | 28 | install: ## Install all binaries |
23 | 29 | cp sslcli /usr/bin/sslcli |
24 | 30 |
|
25 | 31 | uninstall: ## Uninstall all binaries |
26 | 32 | rm -f /usr/bin/sslcli |
27 | 33 |
|
28 | | -deps: mod-update ## Download dependencies |
| 34 | +init: mod-init ## Initialize new module |
29 | 35 |
|
30 | | -mod-init: ## Initialize new module |
31 | | - go mod init |
32 | | - go mod tidy |
| 36 | +deps: mod-download ## Download dependencies |
33 | 37 |
|
34 | | -mod-update: ## Download modules to local cache |
| 38 | +update: mod-update ## Update dependencies to the latest versions |
| 39 | + |
| 40 | +vendor: mod-vendor ## Make vendored copy of dependencies |
| 41 | + |
| 42 | +mod-init: |
| 43 | +ifdef MODULE_PATH ## Module path for initialization (String) |
| 44 | + go mod init $(MODULE_PATH) |
| 45 | +else |
| 46 | + go mod init |
| 47 | +endif |
| 48 | + |
| 49 | +ifdef COMPAT ## Compatible Go version (String) |
| 50 | + go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) |
| 51 | +else |
| 52 | + go mod tidy $(VERBOSE_FLAG) |
| 53 | +endif |
| 54 | + |
| 55 | +mod-update: |
| 56 | +ifdef UPDATE_ALL ## Update all dependencies (Flag) |
| 57 | + go get -u $(VERBOSE_FLAG) all |
| 58 | +else |
| 59 | + go get -u $(VERBOSE_FLAG) ./... |
| 60 | +endif |
| 61 | + |
| 62 | +ifdef COMPAT |
| 63 | + go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) |
| 64 | +else |
| 65 | + go mod tidy $(VERBOSE_FLAG) |
| 66 | +endif |
| 67 | + |
| 68 | + test -d vendor && go mod vendor $(VERBOSE_FLAG) || : |
| 69 | + |
| 70 | +mod-download: |
35 | 71 | go mod download |
36 | 72 |
|
37 | | -mod-vendor: ## Make vendored copy of dependencies |
38 | | - go mod vendor |
| 73 | +mod-vendor: |
| 74 | + go mod vendor $(VERBOSE_FLAG) |
39 | 75 |
|
40 | 76 | fmt: ## Format source code with gofmt |
41 | 77 | find . -name "*.go" -exec gofmt -s -w {} \; |
42 | 78 |
|
43 | | -vet: ## Runs go vet over sources |
| 79 | +vet: ## Runs 'go vet' over sources |
44 | 80 | go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./... |
45 | 81 |
|
46 | 82 | clean: ## Remove generated files |
47 | 83 | rm -f sslcli |
48 | 84 |
|
49 | 85 | help: ## Show this info |
50 | | - @echo -e '\n\033[1mSupported targets:\033[0m\n' |
| 86 | + @echo -e '\n\033[1mTargets:\033[0m\n' |
51 | 87 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ |
52 | | - | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}' |
| 88 | + | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-14s\033[0m %s\n", $$1, $$2}' |
| 89 | + @echo -e '\n\033[1mVariables:\033[0m\n' |
| 90 | + @grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \ |
| 91 | + | sed 's/ifdef //' \ |
| 92 | + | awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}' |
53 | 93 | @echo -e '' |
54 | | - @echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n' |
| 94 | + @echo -e '\033[90mGenerated by GoMakeGen 2.0.0\033[0m\n' |
55 | 95 |
|
56 | 96 | ################################################################################ |
0 commit comments