1
1

Fix some bugs in the version number scheme, and make the proces a bit

more obvious (and documented)
- VERSION now has lots of comments in it
- separate out whether we want the SVN r number in the version and
  what the SVN r number is
- clearly describe the process for building the full version number
  string 
- make ompi info have a separate line item specifically for the SVN r
  number, regardless of what the version number is
- update "make dist" process to substitute in the SVN r version

This commit was SVN r5022.
Этот коммит содержится в:
Jeff Squyres 2005-03-25 03:19:46 +00:00
родитель c57377a965
Коммит b8f88e8c1c
24 изменённых файлов: 651 добавлений и 90 удалений

Просмотреть файл

@ -20,4 +20,4 @@ SUBDIRS = config include etc src test
EXTRA_DIST = README INSTALL VERSION Doxyfile LICENSE
dist-hook:
csh config/distscript.csh $(PACKAGE)-$(OMPI_VERSION) $(OMPI_VERSION)
csh config/distscript.csh $(PACKAGE)-$(OMPI_VERSION) $(OMPI_VERSION) $(OMPI_SVN_VERSION)

35
VERSION
Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=1
beta=0
svn=2
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -18,20 +18,27 @@
set srcdir="`pwd`"
set distdir="$srcdir/$1"
set OMPI_VERSION="$2"
set OMPI_SVN_VERSION="$3"
if (-z "$distdir") then
if ("$distdir" == "") then
echo "Must supply relative distdir as argv[1] -- aborting"
exit 1
elif (-z "$OMPI_VERSION") then
elif ("$OMPI_VERSION" == "") then
echo "Must supply version as argv[2] -- aborting"
exit 1
endif
set svn_r=
if (-d .svn) then
set svn_r="`svnversion .`"
endif
set start=`date`
cat <<EOF
Creating Open MPI distribution
In directory: `pwd`
Version: $OMPI_VERSION
Started: $start
EOF
@ -50,6 +57,19 @@ endif
cd "$distdir"
echo "*** Now in distdir: $distdir"
#
# See if we need VERSION.svn
#
if ("$svn_r" != "") then
sed -e 's/^svn_r=.*/svn_r='$svn_r'/' VERSION > version.new
cp version.new VERSION
rm -f version.new
echo "*** Updated VERSION file with SVN r number"
else
echo "*** Did NOT updated VERSION file with SVN r number"
endif
#
# Get the latest config.guess and config.sub from ftp.gnu.org
#

Просмотреть файл

@ -30,17 +30,18 @@ gv_prefix="$2"
dnl quote eval to suppress macro expansion with non-GNU m4
gv_run() {
str="${gv_prefix}_${2}=\$gv_${1}_version"
str="${gv_prefix}_${2}=\$gv_${1}"
[eval] $str
}
if test -n "$gv_ver_file" -a -f "$gv_ver_file"; then
gv_major_version="`cat $gv_ver_file | grep major | cut -d= -f2`"
gv_minor_version="`cat $gv_ver_file | grep minor | cut -d= -f2`"
gv_release_version="`cat $gv_ver_file | grep release | cut -d= -f2`"
gv_alpha_version="`cat $gv_ver_file | grep alpha | cut -d= -f2`"
gv_beta_version="`cat $gv_ver_file | grep beta | cut -d= -f2`"
gv_svn_version="`cat $gv_ver_file | grep svn | cut -d= -f2`"
gv_major_version="`egrep ^major= $gv_ver_file | cut -d= -f2`"
gv_minor_version="`egrep ^minor= $gv_ver_file | cut -d= -f2`"
gv_release_version="`egrep ^release= $gv_ver_file | cut -d= -f2`"
gv_alpha_version="`egrep ^alpha= $gv_ver_file | cut -d= -f2`"
gv_beta_version="`egrep ^beta= $gv_ver_file | cut -d= -f2`"
gv_want_svn="`egrep ^want_svn= $gv_ver_file | cut -d= -f2`"
gv_svn_r="`egrep ^svn_r= $gv_ver_file | cut -d= -f2`"
if test -n "$gv_release_version" -a "$gv_release_version" != "0"; then
gv_full_version="$gv_major_version.$gv_minor_version.$gv_release_version"
@ -54,30 +55,33 @@ if test -n "$gv_ver_file" -a -f "$gv_ver_file"; then
gv_full_version="${gv_full_version}b$gv_beta_version"
fi
if test "$gv_svn_version" != "0"; then
if test -d .svn; then
ver="r`svnversion .`"
else
ver="svn`date '+%m%d%Y'`"
if test "$gv_want_svn" = "1"; then
if test "$gv_svn_r" = "-1"; then
if test -d .svn; then
ver="r`svnversion .`"
else
ver="svn`date '+%m%d%Y'`"
fi
gv_svn_r="$ver"
fi
gv_svn_version="$ver"
gv_full_version="${gv_full_version}$ver"
gv_full_version="${gv_full_version}$gv_svn_r"
fi
# Set the values
gv_run full VERSION
gv_run major MAJOR_VERSION
gv_run minor MINOR_VERSION
gv_run release RELEASE_VERSION
gv_run alpha ALPHA_VERSION
gv_run beta BETA_VERSION
gv_run svn SVN_VERSION
gv_run full_version VERSION
gv_run major_version MAJOR_VERSION
gv_run minor_version MINOR_VERSION
gv_run release_version RELEASE_VERSION
gv_run alpha_version ALPHA_VERSION
gv_run beta_version BETA_VERSION
gv_run want_svn WANT_SVN
gv_run svn_r SVN_R
fi
# Clean up
unset gv_glv_dir gv_ver_file gv_prefix gv_prog gv_run \
gv_major_version gv_minor_version gv_release_version \
gv_alpha_version gv_beta_version gv_svn_version
gv_alpha_version gv_beta_version gv_want_svn gv_svn_r
])

Просмотреть файл

@ -29,12 +29,13 @@ option="$2"
if test "$srcfile" = ""; then
option="--help"
else
OMPI_MAJOR_VERSION="`cat $srcfile | grep major | cut -d= -f2`"
OMPI_MINOR_VERSION="`cat $srcfile | grep minor | cut -d= -f2`"
OMPI_RELEASE_VERSION="`cat $srcfile | grep release | cut -d= -f2`"
OMPI_ALPHA_VERSION="`cat $srcfile | grep alpha | cut -d= -f2`"
OMPI_BETA_VERSION="`cat $srcfile | grep beta | cut -d= -f2`"
OMPI_SVN_VERSION="`cat $srcfile | grep svn | cut -d= -f2`"
OMPI_MAJOR_VERSION="`cat $srcfile | egrep ^major= | cut -d= -f2`"
OMPI_MINOR_VERSION="`cat $srcfile | egrep ^minor= | cut -d= -f2`"
OMPI_RELEASE_VERSION="`cat $srcfile | egrep ^release= | cut -d= -f2`"
OMPI_ALPHA_VERSION="`cat $srcfile | egrep ^alpha= | cut -d= -f2`"
OMPI_BETA_VERSION="`cat $srcfile | egrep ^beta= | cut -d= -f2`"
OMPI_WANT_SVN="`cat $srcfile | egrep ^want_svn= | cut -d= -f2`"
OMPI_SVN_R="`cat $srcfile | egrep ^svn_r= | cut -d= -f2`"
if test "$OMPI_RELEASE_VERSION" != "0" -a "$OMPI_RELEASE_VERSION" != ""; then
OMPI_VERSION="$OMPI_MAJOR_VERSION.$OMPI_MINOR_VERSION.$OMPI_RELEASE_VERSION"
else
@ -47,14 +48,16 @@ else
OMPI_VERSION="${OMPI_VERSION}b$OMPI_BETA_VERSION"
fi
if test "$OMPI_SVN_VERSION" != "0"; then
if test -d .svn; then
ver="r`svnversion .`"
else
ver="svn`date '+%m%d%Y'`"
if test "$OMPI_WANT_SVN" = "1"; then
if "$OMPI_SVN_R" = "-1"; then
if test -d .svn; then
ver="r`svnversion .`"
else
ver="svn`date '+%m%d%Y'`"
fi
OMPI_SVN_R="$ver"
fi
OMPI_SVN_VERSION="$ver"
OMPI_VERSION="${OMPI_VERSION}$ver"
OMPI_VERSION="${OMPI_VERSION}$OMPI_SVN_R"
fi
if test "$option" = ""; then
@ -82,10 +85,10 @@ case "$option" in
echo $OMPI_BETA_VERSION
;;
--svn)
echo $OMPI_SVN_VERSION
echo $OMPI_SVN_R
;;
--all)
echo ${OMPI_VERSION} ${OMPI_MAJOR_VERSION} ${OMPI_MINOR_VERSION} ${OMPI_RELEASE_VERSION} ${OMPI_ALPHA_VERSION} ${OMPI_BETA_VERSION} ${OMPI_SVN_VERSION}
echo ${OMPI_VERSION} ${OMPI_MAJOR_VERSION} ${OMPI_MINOR_VERSION} ${OMPI_RELEASE_VERSION} ${OMPI_ALPHA_VERSION} ${OMPI_BETA_VERSION} ${OMPI_SVN_R}
;;
-h|--help)
cat <<EOF

Просмотреть файл

@ -35,7 +35,8 @@ AC_SUBST(OMPI_MINOR_VERSION)
AC_SUBST(OMPI_RELEASE_VERSION)
AC_SUBST(OMPI_ALPHA_VERSION)
AC_SUBST(OMPI_BETA_VERSION)
AC_SUBST(OMPI_SVN_VERSION)
AC_SUBST(OMPI_WANT_SVN)
AC_SUBST(OMPI_SVN_R)
AC_SUBST(OMPI_VERSION)
#

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=4
minor=5
release=6
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=0
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -1,6 +1,37 @@
major=10
# This is the VERSION file for Open MPI, describing the precise
# version of Open MPI in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If minor and release are both zero, then
# release is omitted.
major=1
minor=0
release=0
# Only one of alpha or beta can be nonzero. If both are zero, alpha
# will be preferred. If alpha is nonzero, it will be appended to the
# version string as "a<alpha>". If beta is nonzero (and alpha is
# zero), it will be appended to the version string as "b<beta>".
alpha=0
beta=0
svn=1
# If want_svn=1, then the SVN r number will be included in the overall
# Open MPI version number in some form.
want_svn=1
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=-1

Просмотреть файл

@ -39,7 +39,8 @@ AM_CPPFLAGS = \
-DOMPI_RELEASE_VERSION=@OMPI_RELEASE_VERSION@ \
-DOMPI_ALPHA_VERSION=@OMPI_ALPHA_VERSION@ \
-DOMPI_BETA_VERSION=@OMPI_BETA_VERSION@ \
-DOMPI_SVN_VERSION=\"@OMPI_SVN_VERSION@\" \
-DOMPI_WANT_SVN=\"@OMPI_WANT_SVN@\" \
-DOMPI_SVN_R=\"@OMPI_SVN_R@\" \
-DOMPI_VERSION=\"@OMPI_VERSION@\"
libs = $(top_builddir)/src/libmpi.la

Просмотреть файл

@ -59,7 +59,7 @@ static void show_mca_version(const mca_base_component_t *component,
const string& scope, const string& ver_type);
static string make_version_str(const string& scope,
int major, int minor, int release, int alpha,
int beta, const string& svn);
int beta, bool want_svn, const string& svn);
//
// do_version
@ -120,12 +120,14 @@ void ompi_info::do_version(bool want_all, ompi_cmd_line_t *cmd_line)
//
void ompi_info::show_ompi_version(const string& scope)
{
out("Open MPI", "version:" + type_ompi,
out("Open MPI", type_ompi + ":version:full",
make_version_str(scope,
OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
OMPI_RELEASE_VERSION,
OMPI_ALPHA_VERSION, OMPI_BETA_VERSION,
OMPI_SVN_VERSION));
OMPI_WANT_SVN, OMPI_SVN_R));
out("SVN revision number", type_ompi + ":version:svn",
OMPI_SVN_R);
}
@ -197,14 +199,16 @@ static void show_mca_version(const mca_base_component_t* component,
mca_version = make_version_str(scope, component->mca_major_version,
component->mca_minor_version,
component->mca_release_version, 0, 0, "");
component->mca_release_version, 0, 0,
false, "");
api_version = make_version_str(scope, component->mca_type_major_version,
component->mca_type_minor_version,
component->mca_type_release_version, 0, 0, "");
component->mca_type_release_version, 0, 0,
false, "");
component_version = make_version_str(scope, component->mca_component_major_version,
component->mca_component_minor_version,
component->mca_component_release_version,
0, 0, "");
0, 0, false, "");
if (pretty) {
message = "MCA ";
@ -247,7 +251,7 @@ static void show_mca_version(const mca_base_component_t* component,
static string make_version_str(const string& scope,
int major, int minor, int release, int alpha,
int beta, const string& svn)
int beta, bool want_svn, const string& svn)
{
string str;
char temp[BUFSIZ];
@ -268,30 +272,31 @@ static string make_version_str(const string& scope,
snprintf(temp, BUFSIZ - 1, "b%d", beta);
str += temp;
}
if (!svn.empty()) {
if (want_svn && !svn.empty()) {
str += svn;
}
} else if (scope == ver_major)
} else if (scope == ver_major) {
snprintf(temp, BUFSIZ - 1, "%d", major);
else if (scope == ver_minor)
} else if (scope == ver_minor) {
snprintf(temp, BUFSIZ - 1, "%d", minor);
else if (scope == ver_release)
} else if (scope == ver_release) {
snprintf(temp, BUFSIZ - 1, "%d", release);
else if (scope == ver_alpha)
} else if (scope == ver_alpha) {
snprintf(temp, BUFSIZ - 1, "%d", alpha);
else if (scope == ver_beta)
} else if (scope == ver_beta) {
snprintf(temp, BUFSIZ - 1, "%d", beta);
else if (scope == ver_svn)
} else if (scope == ver_svn) {
str = svn;
else {
} else {
#if 0
show_help("ompi_info", "usage");
#endif
exit(1);
}
if (str.empty())
if (str.empty()) {
str = temp;
}
return str;
}