From b8f88e8c1c0cf6c821185fc9f277bbe090f272ef Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 25 Mar 2005 03:19:46 +0000 Subject: [PATCH] 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. --- Makefile.am | 2 +- VERSION | 35 ++++++++++++++++++++++-- config/distscript.csh | 24 +++++++++++++++-- config/ompi_get_version.m4 | 48 ++++++++++++++++++--------------- config/ompi_get_version.sh | 33 ++++++++++++----------- configure.ac | 3 ++- src/mca/coll/basic/VERSION | 35 ++++++++++++++++++++++-- src/mca/coll/demo/VERSION | 33 ++++++++++++++++++++++- src/mca/coll/hierarch/VERSION | 35 ++++++++++++++++++++++-- src/mca/coll/self/VERSION | 35 ++++++++++++++++++++++-- src/mca/coll/sm/VERSION | 35 ++++++++++++++++++++++-- src/mca/io/romio/VERSION | 35 ++++++++++++++++++++++-- src/mca/pls/daemon/VERSION | 35 ++++++++++++++++++++++-- src/mca/pls/fork/VERSION | 35 ++++++++++++++++++++++-- src/mca/pls/poe/VERSION | 35 ++++++++++++++++++++++-- src/mca/pls/proxy/VERSION | 35 ++++++++++++++++++++++-- src/mca/pls/rsh/VERSION | 35 ++++++++++++++++++++++-- src/mca/pls/slurm/VERSION | 35 ++++++++++++++++++++++-- src/mca/pls/tm/VERSION | 35 ++++++++++++++++++++++-- src/mca/ptl/prof/VERSION | 33 ++++++++++++++++++++++- src/mca/ras/tm/VERSION | 35 ++++++++++++++++++++++-- src/mca/topo/unity/VERSION | 35 ++++++++++++++++++++++-- src/tools/ompi_info/Makefile.am | 3 ++- src/tools/ompi_info/version.cc | 37 ++++++++++++++----------- 24 files changed, 651 insertions(+), 90 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6a34abab48..674ce0a136 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/VERSION b/VERSION index 646659938c..221ab30fa5 100644 --- a/VERSION +++ b/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/config/distscript.csh b/config/distscript.csh index 43e7211be0..ad6df5396a 100755 --- a/config/distscript.csh +++ b/config/distscript.csh @@ -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 < 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 # diff --git a/config/ompi_get_version.m4 b/config/ompi_get_version.m4 index e3af127557..8b1faa6e9d 100644 --- a/config/ompi_get_version.m4 +++ b/config/ompi_get_version.m4 @@ -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 ]) diff --git a/config/ompi_get_version.sh b/config/ompi_get_version.sh index e39e5f2387..183133dca6 100755 --- a/config/ompi_get_version.sh +++ b/config/ompi_get_version.sh @@ -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 <... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/coll/demo/VERSION b/src/mca/coll/demo/VERSION index 04cc8e135c..a8724a70c9 100644 --- a/src/mca/coll/demo/VERSION +++ b/src/mca/coll/demo/VERSION @@ -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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/coll/hierarch/VERSION b/src/mca/coll/hierarch/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/coll/hierarch/VERSION +++ b/src/mca/coll/hierarch/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/coll/self/VERSION b/src/mca/coll/self/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/coll/self/VERSION +++ b/src/mca/coll/self/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/coll/sm/VERSION b/src/mca/coll/sm/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/coll/sm/VERSION +++ b/src/mca/coll/sm/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/io/romio/VERSION b/src/mca/io/romio/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/io/romio/VERSION +++ b/src/mca/io/romio/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/pls/daemon/VERSION b/src/mca/pls/daemon/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/pls/daemon/VERSION +++ b/src/mca/pls/daemon/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/pls/fork/VERSION b/src/mca/pls/fork/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/pls/fork/VERSION +++ b/src/mca/pls/fork/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/pls/poe/VERSION b/src/mca/pls/poe/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/pls/poe/VERSION +++ b/src/mca/pls/poe/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/pls/proxy/VERSION b/src/mca/pls/proxy/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/pls/proxy/VERSION +++ b/src/mca/pls/proxy/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/pls/rsh/VERSION b/src/mca/pls/rsh/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/pls/rsh/VERSION +++ b/src/mca/pls/rsh/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/pls/slurm/VERSION b/src/mca/pls/slurm/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/pls/slurm/VERSION +++ b/src/mca/pls/slurm/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/pls/tm/VERSION b/src/mca/pls/tm/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/pls/tm/VERSION +++ b/src/mca/pls/tm/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/ptl/prof/VERSION b/src/mca/ptl/prof/VERSION index dadc1f42ab..ea4eb96e38 100644 --- a/src/mca/ptl/prof/VERSION +++ b/src/mca/ptl/prof/VERSION @@ -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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/ras/tm/VERSION b/src/mca/ras/tm/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/ras/tm/VERSION +++ b/src/mca/ras/tm/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/mca/topo/unity/VERSION b/src/mca/topo/unity/VERSION index 05a12d4a75..ea4eb96e38 100644 --- a/src/mca/topo/unity/VERSION +++ b/src/mca/topo/unity/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 +# ... 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". If beta is nonzero (and alpha is +# zero), it will be appended to the version string as "b". + 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", or b) with the date (if +# this is not a Subversion checkout, and the svnversion command cannot +# be used) in the form of "svn". 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 diff --git a/src/tools/ompi_info/Makefile.am b/src/tools/ompi_info/Makefile.am index 57bfe7609c..851c9cea88 100644 --- a/src/tools/ompi_info/Makefile.am +++ b/src/tools/ompi_info/Makefile.am @@ -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 diff --git a/src/tools/ompi_info/version.cc b/src/tools/ompi_info/version.cc index 9317093560..c9f0c0e676 100644 --- a/src/tools/ompi_info/version.cc +++ b/src/tools/ompi_info/version.cc @@ -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; }