Update post_process_dist.sh to produce a separate package for each

language.
pull/130/head
Feng Xiao 10 years ago
parent 137dd0f17f
commit 6936f17b88
  1. 2
      configure.ac
  2. 23
      post_process_dist.sh

@ -22,7 +22,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_ARG_VAR(DIST_LANG, [language to include in the distribution package (i.e., make dist)])
case "$DIST_LANG" in
"") DIST_LANG=cpp ;;
"") DIST_LANG=all ;;
all | cpp | java | python | javanano) ;;
*) AC_MSG_FAILURE([unknown language: $DIST_LANG]) ;;
esac

@ -15,8 +15,8 @@
# non-testdata .txt files are converted to Windows-style line endings.
# 5) Cleans up after itself.
if [ "$1" == "" -o "$2" == "" ]; then
echo "USAGE: $0 DISTFILE LANGUAGE" >&2
if [ "$1" == "" ]; then
echo "USAGE: $0 DISTFILE" >&2
exit 1
fi
@ -27,8 +27,9 @@ fi
set -ex
LANGUAGES="cpp java python"
BASENAME=`basename $1 .tar.gz`
LANGUAGE=$2
VERSION=${BASENAME:9}
# Create a directory called "dist", copy the tarball there and unpack it.
mkdir dist
@ -45,17 +46,23 @@ cd $BASENAME/vsprojects
./convert2008to2005.sh
cd ..
# Build the dist again in .tar.gz and .tar.bz2 formats.
./configure DIST_LANG=$LANGUAGE
for LANG in $LANGUAGES; do
# Build the dist again in .tar.gz
./configure DIST_LANG=$LANG
make dist-gzip
make dist-bzip2
mv $BASENAME.tar.gz ../protobuf-$LANG-$VERSION.tar.gz
done
# Convert all text files to use DOS-style line endings, then build a .zip
# distribution.
todos *.txt */*.txt
for LANG in $LANGUAGES; do
# Build the dist again in .zip
./configure DIST_LANG=$LANG
make dist-zip
mv $BASENAME.zip ../protobuf-$LANG-$VERSION.zip
done
# Clean up.
mv $BASENAME.tar.gz $BASENAME.tar.bz2 $BASENAME.zip ..
cd ..
rm -rf $BASENAME

Loading…
Cancel
Save