Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

  1. #!/bin/sh
  2. # Run this script to regenerate descriptor.pb.{h,cc} after the protocol
  3. # compiler changes. Since these files are compiled into the protocol compiler
  4. # itself, they cannot be generated automatically by a make rule. "make check"
  5. # will fail if these files do not match what the protocol compiler would
  6. # generate.
  7. #
  8. # HINT: Flags passed to generate_descriptor_proto.sh will be passed directly
  9. # to make when building protoc. This is particularly useful for passing
  10. # -j4 to run 4 jobs simultaneously.
  11. if test ! -e src/google/protobuf/stubs/common.h; then
  12. cat >&2 << __EOF__
  13. Could not find source code. Make sure you are running this script from the
  14. root of the distribution tree.
  15. __EOF__
  16. exit 1
  17. fi
  18. if test ! -e src/Makefile; then
  19. cat >&2 << __EOF__
  20. Could not find src/Makefile. You must run ./configure (and perhaps
  21. ./autogen.sh) first.
  22. __EOF__
  23. exit 1
  24. fi
  25. cd src
  26. make $@ protoc &&
  27. ./protoc --cpp_out=dllexport_decl=LIBPROTOBUF_EXPORT:. google/protobuf/descriptor.proto && \
  28. ./protoc --cpp_out=dllexport_decl=LIBPROTOC_EXPORT:. google/protobuf/compiler/plugin.proto
  29. cd ..