mpir/devel/setversion

76 lines
2.8 KiB
Plaintext
Raw Normal View History

#!/bin/bash
# run this script from the devel directory
2010-04-01 22:03:32 -04:00
# set version number
VERSION=2
2011-02-22 18:48:35 -05:00
VERSION_MINOR=3
VERSION_PATCHLEVEL=0
2009-09-10 19:36:52 -04:00
# these are the library soname numbers see
# http://sources.redhat.com/autobook/autobook/autobook_91.html
# or the start of Makefile.am to see what was done before
LIBGMP_LT_CURRENT=10
2011-02-22 18:48:35 -05:00
LIBGMP_LT_REVISION=7
LIBGMP_LT_AGE=3
LIBGMPXX_LT_CURRENT=4
2011-02-22 18:48:35 -05:00
LIBGMPXX_LT_REVISION=15
LIBGMPXX_LT_AGE=3
2010-06-25 05:34:31 -04:00
# We dont have libmp so we set this to 0.0.0
2009-10-07 17:35:27 -04:00
LIBMP_LT_CURRENT=0
LIBMP_LT_REVISION=0
LIBMP_LT_AGE=0
2009-09-10 19:36:52 -04:00
echo "Setting MPIR to"
echo "MPIR-$VERSION.$VERSION_MINOR.$VERSION_PATCHLEVEL"
echo "GMP-soname-$LIBGMP_LT_CURRENT.$LIBGMP_LT_REVISION.$LIBGMP_LT_AGE"
echo "GMPXX-soname-$LIBGMPXX_LT_CURRENT.$LIBGMPXX_LT_REVISION.$LIBGMPXX_LT_AGE"
###############################################################
##############################################################
VERSION_STR=$VERSION.$VERSION_MINOR.$VERSION_PATCHLEVEL
TMPFILE=$(mktemp mpir.XXXXXX)
#update gmp-h.in
cat ../gmp-h.in \
| sed s/"#define[[:space:]]\+__MPIR_VERSION[[:space:]]\+.*"/"#define __MPIR_VERSION "$VERSION/ \
| sed s/"#define[[:space:]]\+__MPIR_VERSION_MINOR[[:space:]]\+.*"/"#define __MPIR_VERSION_MINOR "$VERSION_MINOR/ \
| sed s/"#define[[:space:]]\+__MPIR_VERSION_PATCHLEVEL[[:space:]]\+.*"/"#define __MPIR_VERSION_PATCHLEVEL "$VERSION_PATCHLEVEL/ \
| sed s/"#define[[:space:]]\+_MSC_MPIR_VERSION[[:space:]]\+.*"/"#define _MSC_MPIR_VERSION "\"$VERSION_STR\"/ > $TMPFILE
mv $TMPFILE ../gmp-h.in
#update Makefile.am
cat ../Makefile.am \
| sed s/"LIBGMP_LT_CURRENT[[:space:]]*=[[:space:]]*.*"/"LIBGMP_LT_CURRENT = "$LIBGMP_LT_CURRENT/ \
| sed s/"LIBGMP_LT_REVISION[[:space:]]*=[[:space:]]*.*"/"LIBGMP_LT_REVISION = "$LIBGMP_LT_REVISION/ \
| sed s/"LIBGMP_LT_AGE[[:space:]]*=[[:space:]]*.*"/"LIBGMP_LT_AGE = "$LIBGMP_LT_AGE/ \
| sed s/"LIBGMPXX_LT_CURRENT[[:space:]]*=[[:space:]]*.*"/"LIBGMPXX_LT_CURRENT = "$LIBGMPXX_LT_CURRENT/ \
| sed s/"LIBGMPXX_LT_REVISION[[:space:]]*=[[:space:]]*.*"/"LIBGMPXX_LT_REVISION = "$LIBGMPXX_LT_REVISION/ \
| sed s/"LIBGMPXX_LT_AGE[[:space:]]*=[[:space:]]*.*"/"LIBGMPXX_LT_AGE = "$LIBGMPXX_LT_AGE/ \
| sed s/"LIBMP_LT_CURRENT[[:space:]]*=[[:space:]]*.*"/"LIBMP_LT_CURRENT = "$LIBMP_LT_CURRENT/ \
| sed s/"LIBMP_LT_REVISION[[:space:]]*=[[:space:]]*.*"/"LIBMP_LT_REVISION = "$LIBMP_LT_REVISION/ \
| sed s/"LIBMP_LT_AGE[[:space:]]*=[[:space:]]*.*"/"LIBMP_LT_AGE = "$LIBMP_LT_AGE/ > $TMPFILE
mv $TMPFILE ../Makefile.am
#update doc/version
echo -n "@set UPDATED " > ../doc/version.texi
date "+%d %B %Y" >> ../doc/version.texi
echo -n "@set UPDATED-MONTH " >> ../doc/version.texi
date "+%B %Y" >> ../doc/version.texi
echo "@set EDITION $VERSION_STR" >> ../doc/version.texi
echo "@set VERSION $VERSION_STR" >> ../doc/version.texi
#update makeinfo
cd ../doc
makeinfo mpir.texi
makeinfo version.texi
cd ..
autoreconf -f
rm -f $TMPFILE
cd devel