Commit dffd542b authored by Feng Xiao's avatar Feng Xiao

Update ./update_file_lists.sh.

Make it executable and generate extract_includes.bat in the same directory.
parent e9839ff4
...@@ -47,6 +47,11 @@ include(find_hash_map.cmake) ...@@ -47,6 +47,11 @@ include(find_hash_map.cmake)
configure_file(config.h.in config.h) configure_file(config.h.in config.h)
configure_file(pbconfig.h.in google/protobuf/stubs/pbconfig.h) configure_file(pbconfig.h.in google/protobuf/stubs/pbconfig.h)
if (MSVC)
string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR})
string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR})
configure_file(extract_includes.bat.in extract_includes.bat)
endif (MSVC)
get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH) get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH)
......
This diff is collapsed.
...@@ -39,8 +39,8 @@ set_variable_value() { ...@@ -39,8 +39,8 @@ set_variable_value() {
/^set\\($VARNAME/ { /^set\\($VARNAME/ {
start = 1; start = 1;
print \$0; print \$0;
split(values, vlist, \" \"); len = split(values, vlist, \" \");
for (i = 1; i <= length(vlist); ++i) { for (i = 1; i <= len; ++i) {
printf(\" %s%s\\n\", prefix, vlist[i]); printf(\" %s%s\\n\", prefix, vlist[i]);
} }
next; next;
...@@ -58,12 +58,12 @@ set_variable_value() { ...@@ -58,12 +58,12 @@ set_variable_value() {
sort_files() { sort_files() {
for FILE in $@; do for FILE in $@; do
echo $FILE echo $FILE
done | sort | uniq done | LC_ALL=C sort | uniq
} }
MAKEFILE=../src/Makefile.am MAKEFILE=../src/Makefile.am
CMAKE_DIR=. CMAKE_DIR=.
EXTRACT_INCLUDES_BAT=../vsprojects/extract_includes.bat EXTRACT_INCLUDES_BAT=extract_includes.bat.in
[ -f "$MAKEFILE" ] || { [ -f "$MAKEFILE" ] || {
echo "Cannot find: $MAKEFILE" echo "Cannot find: $MAKEFILE"
...@@ -105,10 +105,17 @@ set_variable_value $CMAKE_DIR/tests.cmake tests_files $COMMON_PREFIX $TEST_SOURC ...@@ -105,10 +105,17 @@ set_variable_value $CMAKE_DIR/tests.cmake tests_files $COMMON_PREFIX $TEST_SOURC
set_variable_value $CMAKE_DIR/tests.cmake lite_test_files $COMMON_PREFIX $LITE_TEST_SOURCES set_variable_value $CMAKE_DIR/tests.cmake lite_test_files $COMMON_PREFIX $LITE_TEST_SOURCES
# Generate extract_includes.bat # Generate extract_includes.bat
for HEADER in $HEADERS; do echo "mkdir include" > $EXTRACT_INCLUDES_BAT
echo $(dirname $HEADER) | sed "s/\\//\\\\/g" for HEADER in $PUBLIC_HEADERS; do
done | sort | uniq | sed "s/^/mkdir include\\\\/" > $EXTRACT_INCLUDES_BAT HEADER_DIR=$(dirname $HEADER)
for HEADER in $HEADERS; do while [ ! "$HEADER_DIR" = "." ]; do
WINPATH=$(echo $HEADER | sed 's;/;\\\\;g') echo $HEADER_DIR | sed "s/\\//\\\\/g"
echo "copy ..\\src\\$WINPATH include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT HEADER_DIR=$(dirname $HEADER_DIR)
done
done | sort | uniq | sed "s/^/mkdir include\\\\/" >> $EXTRACT_INCLUDES_BAT
for HEADER in $PUBLIC_HEADERS; do
WINPATH=$(echo $HEADER | sed 's;/;\\;g')
echo "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\..\\src\\$WINPATH include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT
done done
# Add pbconfig.h.
echo "copy \${PROTOBUF_BINARY_WIN32_PATH}\\google\\protobuf\\stubs\\pbconfig.h include\\google\\protobuf\\stubs\\pbconfig.h" >> $EXTRACT_INCLUDES_BAT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment