Skip to content

Commit

Permalink
Makefile: fix cpp proto cleanup
Browse files Browse the repository at this point in the history
The former find invocations were only operating inside ./pkg, but the
CPP protos are generated into c-deps/protos and c-deps/protoccl. Since
they have dedicated directories, just nuke those directories instead of
mucking around with find.

Release note: None
  • Loading branch information
benesch committed Jan 31, 2018
1 parent 9ca1b66 commit 66c05c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -987,14 +987,14 @@ $(GW_PROTOS_TARGET): $(PROTOC) $(GW_SERVER_PROTOS) $(GW_TS_PROTOS) $(GO_PROTOS)
touch $@

$(CPP_PROTOS_TARGET): $(PROTOC) $(CPP_PROTOS)
$(FIND_RELEVANT) -type f \( -name '*.pb.h' -o -name '*.pb.cc' \) -exec rm {} +
rm -rf $(CPP_PROTO_ROOT)
mkdir -p $(CPP_PROTO_ROOT)
build/werror.sh $(PROTOC) -I$(PKG_ROOT):$(GOGO_PROTOBUF_PATH):$(PROTOBUF_PATH) --cpp_out=lite:$(CPP_PROTO_ROOT) $(CPP_PROTOS)
$(SED_INPLACE) -E '/gogoproto/d' $(CPP_HEADERS) $(CPP_SOURCES)
touch $@

$(CPP_PROTOS_CCL_TARGET): $(PROTOC) $(CPP_PROTOS_CCL)
$(FIND_RELEVANT) -type f \( -name '*.pb.h' -o -name '*.pb.cc' \) -exec rm {} +
rm -rf $(CPP_PROTO_CCL_ROOT)
mkdir -p $(CPP_PROTO_CCL_ROOT)
build/werror.sh $(PROTOC) -I$(PKG_ROOT):$(GOGO_PROTOBUF_PATH):$(PROTOBUF_PATH) --cpp_out=lite:$(CPP_PROTO_CCL_ROOT) $(CPP_PROTOS_CCL)
$(SED_INPLACE) -E '/gogoproto/d' $(CPP_HEADERS_CCL) $(CPP_SOURCES_CCL)
Expand Down

0 comments on commit 66c05c8

Please sign in to comment.