-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdep_buf.mk
More file actions
49 lines (41 loc) · 1.2 KB
/
Copy pathdep_buf.mk
File metadata and controls
49 lines (41 loc) · 1.2 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
# Managed by makego. DO NOT EDIT.
# Must be set
$(call _assert_var,MAKEGO)
$(call _conditional_include,$(MAKEGO)/base.mk)
$(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)
# Settable
# https://github.com/bufbuild/buf/releases 20260616 checked 20260616
BUF_VERSION ?= v1.71.0
# Settable
#
# If set, this path will be installed every time someone depends on $(BUF)
# as opposed to installing from github with @$(BUF_VERSION).
#
# This can be used to always do "go install ./cmd/buf" or
# "go install github.com/bufbuild/buf/cmd/buf".
BUF_GO_INSTALL_PATH ?=
ifneq ($(BUF_GO_INSTALL_PATH),)
.PHONY: __goinstallbuf
__goinstallbuf:
go install $(GO_INSTALL_EXTRA_FLAGS) $(BUF_GO_INSTALL_PATH)
BUF := __goinstallbuf
# Use this instead of "buf" when using buf.
BUF_BIN := $(CACHE_GOBIN)/buf
else
BUF := $(CACHE_BIN)/buf
# Use this instead of "buf" when using buf.
BUF_BIN := $(BUF)
$(CACHE_VERSIONS)/buf/buf-$(BUF_VERSION):
@rm -f $(BUF)
@rm -rf $(dir $@)
@mkdir -p $(dir $@)
GOBIN=$(dir $@) go install github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION)
@mv $(dir $@)/buf $@
@test -x $@
@touch $@
$(BUF): $(CACHE_VERSIONS)/buf/buf-$(BUF_VERSION)
@mkdir -p $(dir $@)
@ln -sf $< $@
dockerdeps:: $(BUF)
endif