Skip to content

Commit 7d4c46b

Browse files
committed
Tweaks to Makefiles
1 parent 682b6d8 commit 7d4c46b

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

protobuf-grpc/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ setup:
1717
# This target is just here to make regeneration easier without changing
1818
# directories
1919
gen:
20-
@make -s -C ./proto generate
20+
@make -s -C ./proto gen
21+
22+
gen-custom:
23+
@make -s -C ./protoc-gen-list-messages gen
2124

2225
# Wrappers for running clients & servers of each language
2326
server-go:

protobuf-grpc/proto/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,33 @@ ensure-outdir:
3030
#
3131
# Most lang/output code can be generated directly by a single call to protoc
3232
# with available plugins ...
33-
generate: ensure-outdir
33+
gen: ensure-outdir
3434
@printf 'Generating protobuf code...\n'
3535
@$(pyvenv) && \
3636
protoc \
3737
$(proto_deps_import_flags) \
3838
--go_out=$(outdir) \
3939
--go_opt=paths=source_relative \
40+
\
4041
--go-grpc_out=$(outdir) \
4142
--go-grpc_opt=paths=source_relative \
4243
--go-grpc_opt=require_unimplemented_servers=false \
44+
\
4345
--grpc-gateway_out=$(outdir) \
4446
--grpc-gateway_opt=logtostderr=true \
4547
--grpc-gateway_opt=paths=source_relative \
4648
--grpc-gateway_opt=generate_unbound_methods=true \
49+
\
4750
--openapiv2_out=$(outdir) \
4851
--openapiv2_opt=logtostderr=true \
4952
--openapiv2_opt=generate_unbound_methods=true \
53+
\
5054
--python_out=$(outdir) \
5155
--pyi_out=$(outdir) \
56+
\
5257
--descriptor_set_out=./protoset \
5358
--include_imports \
59+
\
5460
$(proto_files)
5561
# ... but Python gRPC seems to be an angry elf, so we have to use a protoc
5662
# distro that's in the grpcio_tools Python module

protobuf-grpc/protoc-gen-list-messages/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build:
55

66
gen: build
77
@mkdir -p ./pb
8+
@printf 'Generating code using custom protoc plugin...\n'
89
@protoc \
910
--plugin=./build/protoc-gen-list-messages \
1011
-I../proto \

0 commit comments

Comments
 (0)