Skip to content
Snippets Groups Projects
Commit 44181c02 authored by Alistair Veitch's avatar Alistair Veitch
Browse files

fix options file; fix generated include guards

parent 3e97668d
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ filegroups: ...@@ -34,6 +34,7 @@ filegroups:
plugin: census_grpc_plugin plugin: census_grpc_plugin
uses: uses:
- grpc_base - grpc_base
- nanopb
- name: gpr_base - name: gpr_base
public_headers: public_headers:
- include/grpc/support/alloc.h - include/grpc/support/alloc.h
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
/* Automatically generated nanopb header */ /* Automatically generated nanopb header */
/* Generated by nanopb-0.3.5-dev */ /* Generated by nanopb-0.3.5-dev */
#ifndef PB_CENSUS_PB_H_INCLUDED #ifndef GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
#define PB_CENSUS_PB_H_INCLUDED #define GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
#include "third_party/nanopb/pb.h" #include "third_party/nanopb/pb.h"
#if PB_PROTO_HEADER_VERSION != 30 #if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator. #error Regenerate this file with the current version of nanopb generator.
......
google.census.Tag.key max_size:255 google.census.Tag.key max_size:255
google.census.Tag.value max_size:255 google.census.Tag.value max_size:255
google.census.View.tag_keys max_count 15 google.census.View.tag_key max_count:15
Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03
...@@ -136,6 +136,13 @@ readonly PROTO_BASENAME=$(basename $INPUT_PROTO .proto) ...@@ -136,6 +136,13 @@ readonly PROTO_BASENAME=$(basename $INPUT_PROTO .proto)
sed -i "s:$PROTO_BASENAME.pb.h:${GRPC_OUTPUT_DIR}/$PROTO_BASENAME.pb.h:g" \ sed -i "s:$PROTO_BASENAME.pb.h:${GRPC_OUTPUT_DIR}/$PROTO_BASENAME.pb.h:g" \
"$OUTPUT_DIR/$PROTO_BASENAME.pb.c" "$OUTPUT_DIR/$PROTO_BASENAME.pb.c"
# Fix up the include guards such that they pass the check_include_guards.py
# test. Assumes that the generated files are being placed in gRPC src dir.
readonly INCLUDE_GUARD_BASE=`echo $GRPC_OUTPUT_DIR | tr [a-z/] [A-Z_] | sed s:^.*SRC_::`
readonly UC_PROTO_BASENAME=`echo $PROTO_BASENAME | tr [a-z] [A-Z]`
sed -i "s:PB_${UC_PROTO_BASENAME}_PB_H_INCLUDED:GRPC_${INCLUDE_GUARD_BASE}_${UC_PROTO_BASENAME}_PB_H:g" \
"$OUTPUT_DIR/$PROTO_BASENAME.pb.h"
# prepend copyright # prepend copyright
TMPFILE=$(mktemp) TMPFILE=$(mktemp)
cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment