Skip to content

Commit

Permalink
fix Makefile
Browse files Browse the repository at this point in the history
fix Makefile proto gen conditions
  • Loading branch information
francoposa committed Dec 27, 2024
1 parent 1363c18 commit b195a63
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 433 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ GENERATE_FILES ?= true

%.pb.go: %.proto
ifeq ($(GENERATE_FILES),true)
protoc -I $(GOPATH)/src:./vendor/github.com/gogo/protobuf:./vendor:./$(@D):./pkg/storegateway/storepb --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./$(@D) ./$(patsubst %.pb.go,%.proto,$@)
if case "$@" in *_custom_types.pb.go) false ;; *) true ;; esac; then \
protoc -I $(GOPATH)/src:./vendor/github.com/gogo/protobuf:./vendor:./$(@D):./pkg/storegateway/storepb --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./$(@D) ./$(patsubst %.pb.go,%.proto,$@); \
else \
echo "Skipping $@"; \
fi
else
@echo "Warning: generating files has been disabled, but the following file needs to be regenerated: $@"
@echo "If this is unexpected, check if the last modified timestamps on $@ and $(patsubst %.pb.go,%.proto,$@) are correct."
Expand Down
Loading

0 comments on commit b195a63

Please sign in to comment.