Commit a203714e authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r7080] Initial draft of shared library versioning support.

Reviewed by goodell.
parent d7842800
......@@ -137,7 +137,7 @@ AC_SUBST(RELEASE_DATE)
# Try to find the version
if test -s "$srcdir/maint/Version" ; then
MPICH2_VERSION="`cat $srcdir/maint/Version | grep ^MPICH2_VERSION: | cut -f2 -d' '`"
. $srcdir/maint/Version
export MPICH2_VERSION
else
AC_MSG_ERROR([Version information not found. Configuration aborted.])
......@@ -190,19 +190,11 @@ MPICH2_NUMVERSION=`expr $V1$V2$V3$V4$V5 + 0`
AC_SUBST(MPICH2_NUMVERSION)
AC_SUBST(MPICH2_VERSION)
# ABIVERSION is incremented when there are changes in the ABI. This is
# used to let a shared library describe how compatible it is with executables
# that were linked against it. In our use, the version number is x:y, where
# x changes when the ABI changes
# y changes when major behavior of the routines, without changing the ABI;
# reset y to one when x changes. Following libtool's versioning scheme, 0 is
# the lowest value for any of the fields of the ABIVERSION string.
# The ABIVERSION is not the same as the VERSION. It is used principly in the
# Makefile.sm to pass the ABIVERSION to the createshlib script.
# We use libtool-style version numbers (see --version-info in the
# libtool manual)
ABIVERSION="`cat $srcdir/maint/Version | grep ^MPICH2_ABIVERSION: | cut -f2 -d' '`"
# ABIVERSION is the name used by simplemake, so we reassign the
# libmpich_so_version number to it
ABIVERSION=${libmpich_so_version}
export ABIVERSION
export libmpich_so_version
AC_SUBST(ABIVERSION)
# Print out the configure options
......
MPICH2_VERSION: 1.3b1
MPICH2_ABIVERSION: 2:0
#
# (C) 2006 by Argonne National Laboratory.
# See COPYRIGHT in top-level directory.
#
# Version Information
MPICH2_VERSION=1.3b1
# For libtool ABI versioning rules see:
# http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
# 1. If the library source code has changed at all since the last
# update, then increment revision (`c:r:a' becomes `c:r+1:a').
#
# 2. If any interfaces have been added, removed, or changed since
# the last update, increment current, and set revision to 0.
#
# 3. If any interfaces have been added since the last public
# release, then increment age.
#
# 4. If any interfaces have been removed since the last public
# release, then set age to 0.
libmpich_so_version=2:0
......@@ -612,9 +612,9 @@ echo
########################################################################
echo_n "Updating the README... "
VERSION=`cat maint/Version | grep ^MPICH2_VERSION | cut -f2 -d' '`
. ./maint/Version
if [ -f README.vin ] ; then
sed -e "s/%VERSION%/${VERSION}/g" README.vin > README
sed -e "s/%VERSION%/${MPICH2_VERSION}/g" README.vin > README
echo "done"
else
echo "error"
......@@ -628,7 +628,7 @@ fi
echo_n "Creating src/pm/smpd/smpd_version.h... "
if [ "$do_smpdversion" = yes ] ; then
smpdVersion=`cat maint/Version | grep ^MPICH2_VERSION | cut -f2 -d' '`
smpdVersion=${MPICH2_VERSION}
cat >src/pm/smpd/smpd_version.h <<EOF
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
......
......@@ -133,10 +133,6 @@ export ETAGSADD
PAC_UPDATE_BASE_CACHE
# define the ABI version of the channel ABI that we are using.
ABIVERSION=1:1
AC_SUBST(ABIVERSION)
dnl Add a step to create the dependencies directory if it is not present
AC_OUTPUT_COMMANDS([if grep 'dependencies:' Makefile >/dev/null 2>&1 ; then
if test ! -s src/.deps/alldeps ; then
......
......@@ -9,3 +9,4 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
lib_LTLIBRARIES = libmpl.la
libmpl_la_SOURCES = src/mplstr.c src/mpltrmem.c src/mplenv.c
libmpl_la_LDFLAGS = -version-info ${libmpl_so_version}
# -*- Mode: c-basic-offset:4 ; indent-tabs-mode:nil ; -*-
#
# (C) 2008 by Argonne National Laboratory.
# See COPYRIGHT in top-level directory.
#
# For libtool ABI versioning rules see:
# http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
# 1. If the library source code has changed at all since the last
# update, then increment revision (`c:r:a' becomes `c:r+1:a').
#
# 2. If any interfaces have been added, removed, or changed since
# the last update, increment current, and set revision to 0.
#
# 3. If any interfaces have been added since the last public
# release, then increment age.
#
# 4. If any interfaces have been removed since the last public
# release, then set age to 0.
libmpl_so_version=1:0
......@@ -16,6 +16,13 @@ save_cflags=$CFLAGS
LT_INIT(disable-shared)
CFLAGS=$save_cflags
if test -s "$srcdir/VERSION" ; then
. $srcdir/VERSION
AC_SUBST(libmpl_so_version)
else
AC_MSG_ERROR([Version information not found. Configuration aborted.])
fi
AC_CONFIG_HEADER([include/config.h])
AX_PREFIX_CONFIG_H([include/mplconfig.h],[MPL])
......
......@@ -47,7 +47,8 @@ AS_CASE([$host],
# Build information
if test -s "$srcdir/version/version" ; then
HYDRA_VERSION="`cat $srcdir/version/version | grep ^MPICH2_VERSION: | cut -f2 -d' '`"
. $srcdir/version/version
HYDRA_VERSION=${MPICH2_VERSION}
else
HYDRA_VERSION="development copy based on svn version: `svnversion $srcdir`"
fi
......
......@@ -9,3 +9,4 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
lib_LTLIBRARIES = libmpl.la
libmpl_la_SOURCES = src/mplstr.c src/mpltrmem.c src/mplenv.c
libmpl_la_LDFLAGS = -version-info ${libmpl_so_version}
# -*- Mode: c-basic-offset:4 ; indent-tabs-mode:nil ; -*-
#
# (C) 2008 by Argonne National Laboratory.
# See COPYRIGHT in top-level directory.
#
# For libtool ABI versioning rules see:
# http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
# 1. If the library source code has changed at all since the last
# update, then increment revision (`c:r:a' becomes `c:r+1:a').
#
# 2. If any interfaces have been added, removed, or changed since
# the last update, increment current, and set revision to 0.
#
# 3. If any interfaces have been added since the last public
# release, then increment age.
#
# 4. If any interfaces have been removed since the last public
# release, then set age to 0.
libmpl_so_version=1:0
......@@ -16,6 +16,13 @@ save_cflags=$CFLAGS
LT_INIT(disable-shared)
CFLAGS=$save_cflags
if test -s "$srcdir/VERSION" ; then
. $srcdir/VERSION
AC_SUBST(libmpl_so_version)
else
AC_MSG_ERROR([Version information not found. Configuration aborted.])
fi
AC_CONFIG_HEADER([include/config.h])
AX_PREFIX_CONFIG_H([include/mplconfig.h],[MPL])
......
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