temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 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 |
| 7 | # generate. |
| 8 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9 | if test ! -e src/google/protobuf/stubs/common.h; then |
| 10 | cat >&2 << __EOF__ |
| 11 | Could not find source code. Make sure you are running this script from the |
| 12 | root of the distribution tree. |
| 13 | __EOF__ |
| 14 | exit 1 |
| 15 | fi |
| 16 | |
| 17 | if test ! -e src/Makefile; then |
| 18 | cat >&2 << __EOF__ |
| 19 | Could not find src/Makefile. You must run ./configure (and perhaps |
| 20 | ./autogen.sh) first. |
| 21 | __EOF__ |
| 22 | exit 1 |
| 23 | fi |
| 24 | |
kenton@google.com | 2f669cb | 2008-12-02 05:59:15 +0000 | [diff] [blame] | 25 | cd src |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 26 | make protoc && ./protoc --cpp_out=dllexport_decl=LIBPROTOBUF_EXPORT:. google/protobuf/descriptor.proto |
kenton@google.com | 2f669cb | 2008-12-02 05:59:15 +0000 | [diff] [blame] | 27 | cd .. |