blob: 548b2e8ff638f8e5dca6e4f78c5e833b4694f618 [file] [log] [blame]
temporal40ee5512008-07-10 02:12:20 +00001#!/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
temporal40ee5512008-07-10 02:12:20 +00009if test ! -e src/google/protobuf/stubs/common.h; then
10 cat >&2 << __EOF__
11Could not find source code. Make sure you are running this script from the
12root of the distribution tree.
13__EOF__
14 exit 1
15fi
16
17if test ! -e src/Makefile; then
18 cat >&2 << __EOF__
19Could not find src/Makefile. You must run ./configure (and perhaps
20./autogen.sh) first.
21__EOF__
22 exit 1
23fi
24
kenton@google.com2f669cb2008-12-02 05:59:15 +000025cd src
temporal40ee5512008-07-10 02:12:20 +000026make protoc && ./protoc --cpp_out=dllexport_decl=LIBPROTOBUF_EXPORT:. google/protobuf/descriptor.proto
kenton@google.com2f669cb2008-12-02 05:59:15 +000027cd ..