diff options
Diffstat (limited to 'update_file_lists.sh')
-rwxr-xr-x | update_file_lists.sh | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/update_file_lists.sh b/update_file_lists.sh index 34443456..d76a1610 100755 --- a/update_file_lists.sh +++ b/update_file_lists.sh @@ -27,6 +27,10 @@ get_source_files() { get_variable_value $@ | grep "cc$" } +get_proto_files_blacklisted() { + get_proto_files $@ | sed '/^google\/protobuf\/unittest_enormous_descriptor.proto$/d' +} + get_proto_files() { get_variable_value $@ | grep "pb.cc$" | sed "s/pb.cc/proto/" } @@ -53,10 +57,13 @@ LIBPROTOBUF_SOURCES=$(get_source_files $MAKEFILE libprotobuf_la_SOURCES) LIBPROTOC_SOURCES=$(get_source_files $MAKEFILE libprotoc_la_SOURCES) LITE_PROTOS=$(get_proto_files $MAKEFILE protoc_lite_outputs) PROTOS=$(get_proto_files $MAKEFILE protoc_outputs) +PROTOS_BLACKLISTED=$(get_proto_files_blacklisted $MAKEFILE protoc_outputs) WKT_PROTOS=$(get_variable_value $MAKEFILE nobase_dist_proto_DATA) COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES) +COMMON_LITE_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_LITE_TEST_SOURCES) TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_test_SOURCES) LITE_TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_lite_test_SOURCES) +LITE_ARENA_TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_lite_arena_test_SOURCES) TEST_PLUGIN_SOURCES=$(get_source_files $MAKEFILE test_plugin_SOURCES) ################################################################################ @@ -110,10 +117,12 @@ set_cmake_value $CMAKE_DIR/libprotobuf-lite.cmake libprotobuf_lite_files $CMAKE_ set_cmake_value $CMAKE_DIR/libprotobuf.cmake libprotobuf_files $CMAKE_PREFIX $LIBPROTOBUF_SOURCES set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_files $CMAKE_PREFIX $LIBPROTOC_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake lite_test_protos "" $LITE_PROTOS -set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS +set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS_BLACKLISTED set_cmake_value $CMAKE_DIR/tests.cmake common_test_files $CMAKE_PREFIX $COMMON_TEST_SOURCES +set_cmake_value $CMAKE_DIR/tests.cmake common_lite_test_files $CMAKE_PREFIX $COMMON_LITE_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake tests_files $CMAKE_PREFIX $TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake lite_test_files $CMAKE_PREFIX $LITE_TEST_SOURCES +set_cmake_value $CMAKE_DIR/tests.cmake lite_arena_test_files $CMAKE_PREFIX $LITE_ARENA_TEST_SOURCES # Generate extract_includes.bat echo "mkdir include" > $EXTRACT_INCLUDES_BAT @@ -133,11 +142,6 @@ done # Update bazel BUILD files. ################################################################################ -BAZEL_BUILD=./BUILD -[ -f "$BAZEL_BUILD" ] || { - echo "Cannot find: $BAZEL_BUILD" - exit 1 -} set_bazel_value() { local FILENAME=$1 local VARNAME=$2 @@ -169,14 +173,19 @@ set_bazel_value() { } +BAZEL_BUILD=./BUILD BAZEL_PREFIX="src/" -set_bazel_value $BAZEL_BUILD protobuf_lite_srcs $BAZEL_PREFIX $LIBPROTOBUF_LITE_SOURCES -set_bazel_value $BAZEL_BUILD protobuf_srcs $BAZEL_PREFIX $LIBPROTOBUF_SOURCES -set_bazel_value $BAZEL_BUILD protoc_lib_srcs $BAZEL_PREFIX $LIBPROTOC_SOURCES -set_bazel_value $BAZEL_BUILD lite_test_protos "" $LITE_PROTOS -set_bazel_value $BAZEL_BUILD well_known_protos "" $WKT_PROTOS -set_bazel_value $BAZEL_BUILD test_protos "" $PROTOS -set_bazel_value $BAZEL_BUILD common_test_srcs $BAZEL_PREFIX $COMMON_TEST_SOURCES -set_bazel_value $BAZEL_BUILD test_srcs $BAZEL_PREFIX $TEST_SOURCES -set_bazel_value $BAZEL_BUILD test_plugin_srcs $BAZEL_PREFIX $TEST_PLUGIN_SOURCES +if [ -f "$BAZEL_BUILD" ]; then + set_bazel_value $BAZEL_BUILD protobuf_lite_srcs $BAZEL_PREFIX $LIBPROTOBUF_LITE_SOURCES + set_bazel_value $BAZEL_BUILD protobuf_srcs $BAZEL_PREFIX $LIBPROTOBUF_SOURCES + set_bazel_value $BAZEL_BUILD protoc_lib_srcs $BAZEL_PREFIX $LIBPROTOC_SOURCES + set_bazel_value $BAZEL_BUILD lite_test_protos "" $LITE_PROTOS + set_bazel_value $BAZEL_BUILD well_known_protos "" $WKT_PROTOS + set_bazel_value $BAZEL_BUILD test_protos "" $PROTOS + set_bazel_value $BAZEL_BUILD common_test_srcs $BAZEL_PREFIX $COMMON_TEST_SOURCES + set_bazel_value $BAZEL_BUILD test_srcs $BAZEL_PREFIX $TEST_SOURCES + set_bazel_value $BAZEL_BUILD test_plugin_srcs $BAZEL_PREFIX $TEST_PLUGIN_SOURCES +else + echo "Skipped BUILD file update." +fi |