3 # Run this script to regenerate descriptor.pb.{h,cc} after the protocol
4 # compiler changes. Since these files are compiled into the protocol compiler
5 # itself, they cannot be generated automatically by a make rule. "make check"
6 # will fail if these files do not match what the protocol compiler would
9 # Note that this will always need to be run once after running
10 # extract_from_google3.sh. That script initially copies descriptor.pb.{h,cc}
11 # over from the google3 code and fixes it up to compile outside of google3, but
12 # it cannot fix the encoded descriptor embedded in descriptor.pb.cc. So, once
13 # the protocol compiler has been built with the slightly-broken
14 # descriptor.pb.cc, the files must be regenerated and the compiler must be
17 if test ! -e src
/google
/protobuf
/stubs
/common.h
; then
19 Could not find source code. Make sure you are running this script from the
20 root of the distribution tree.
25 if test ! -e src
/Makefile
; then
27 Could not find src/Makefile. You must run ./configure (and perhaps
34 make protoc
&& .
/protoc
--cpp_out=dllexport_decl
=LIBPROTOBUF_EXPORT
:. google
/protobuf
/descriptor.proto