Skip to content

Instantly share code, notes, and snippets.

@werkshy
Last active August 29, 2015 14:02
Show Gist options
  • Save werkshy/6b65cefd3423b75911da to your computer and use it in GitHub Desktop.
Save werkshy/6b65cefd3423b75911da to your computer and use it in GitHub Desktop.
Makefile for ruby-protoc (generate .pb.rb files from .proto files).
# Brief makefile to create ruby objects from protocol buffer definitions
GENDIR=./lib/rails-pipeline/protobuf
RUBY_PROTOC=bundle exec ruby-protoc
PROTOS=$(wildcard $(GENDIR)/*.proto)
PBS=$(PROTOS:%.proto=%.pb.rb)
all: $(PBS)
%.pb.rb: %.proto
$(RUBY_PROTOC) $<
clean:
rm -f $(PBS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment