Minor update for something that has been bugging me for quite a while:
OMPI supports multiple different repository systems (SVN, hg, git). But the VERSION file has listed "want_svn" and "svn_r" as fields, even though the actual repo system and version may not be SVN. So search/replace those fields (and derrivative values that come from those fields) with "want_repo_rev" and "repo_rev", respectively. This commit was SVN r24405.
This commit is contained in:
parent
a32a7d9a82
commit
3f4d4886f2
36
VERSION
36
VERSION
@ -1,5 +1,5 @@
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||
|
||||
# This is the VERSION file for Open MPI, describing the precise
|
||||
# version of Open MPI in this distribution. The various components of
|
||||
@ -22,22 +22,30 @@ release=0
|
||||
|
||||
greek=a1
|
||||
|
||||
# If want_svn=1, then the SVN r number will be included in the overall
|
||||
# Open MPI version number in some form.
|
||||
# If want_repo_rev=1, then the repo revision number will be included
|
||||
# in the overall Open MPI version number in some form.
|
||||
|
||||
want_svn=1
|
||||
want_repo_rev=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".
|
||||
# If repo_rev=-1, then the repository version number 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
|
||||
# 2) via the "hg -v -R tip" command (if this is a Mercurial clone)
|
||||
# in the form of "hg<hash>", using the hash tag at the tip
|
||||
# 3) via the "git log -1" command (if this is a Git clone) in the form
|
||||
# of "git<hash>", using the hash tag at the HEAD
|
||||
# 4) with the date (if none of the above work) in the form of
|
||||
# "date<date>".
|
||||
#
|
||||
# Alternatively, if repo_rev is not -1, the value of repo_rev_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, if repo_rev=-1, then its value is replaced
|
||||
# with the output of "svnversion".
|
||||
|
||||
svn_r=-1
|
||||
repo_rev=-1
|
||||
|
||||
# The date when this release was created
|
||||
|
||||
|
@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -31,8 +31,8 @@ AC_DEFUN([OPAL_SAVE_VERSION], [
|
||||
AC_SUBST($1[_MINOR_VERSION])
|
||||
AC_SUBST($1[_RELEASE_VERSION])
|
||||
AC_SUBST($1[_GREEK_VERSION])
|
||||
AC_SUBST($1[_WANT_SVN])
|
||||
AC_SUBST($1[_SVN_R])
|
||||
AC_SUBST($1[_WANT_REPO_REV])
|
||||
AC_SUBST($1[_REPO_REV])
|
||||
AC_SUBST($1[_VERSION])
|
||||
AC_SUBST($1[_RELEASE_DATE])
|
||||
|
||||
@ -41,7 +41,7 @@ AC_DEFUN([OPAL_SAVE_VERSION], [
|
||||
AC_MSG_CHECKING([$2 release date])
|
||||
AC_MSG_RESULT([$]$1[_RELEASE_DATE])
|
||||
AC_MSG_CHECKING([$2 Subversion repository version])
|
||||
AC_MSG_RESULT([$]$1[_SVN_R])
|
||||
AC_MSG_RESULT([$]$1[_REPO_REV])
|
||||
|
||||
AC_DEFINE_UNQUOTED($1[_MAJOR_VERSION], [$]$1[_MAJOR_VERSION],
|
||||
[Major release number of ]$2)
|
||||
|
@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -33,11 +33,11 @@ dnl
|
||||
# prefix_MINOR_VERSION
|
||||
# prefix_RELEASE_VERSION
|
||||
# prefix_GREEK_VERSION
|
||||
# prefix_WANT_SVN
|
||||
# prefix_SVN_R
|
||||
# prefix_WANT_REPO_REV
|
||||
# prefix_REPO_REV
|
||||
# prefix_RELEASE_DATE
|
||||
m4_define([OPAL_GET_VERSION],[
|
||||
: ${ompi_ver_need_svn=1}
|
||||
: ${ompi_ver_need_repo_rev=1}
|
||||
: ${svnversion_result=-1}
|
||||
|
||||
dnl quote eval to suppress macro expansion with non-GNU m4
|
||||
@ -50,8 +50,8 @@ m4_define([OPAL_GET_VERSION],[
|
||||
s/^minor/$2_MINOR_VERSION/
|
||||
s/^release/$2_RELEASE_VERSION/
|
||||
s/^greek/$2_GREEK_VERSION/
|
||||
s/^want_svn/$2_WANT_SVN/
|
||||
s/^svn_r/$2_SVN_R/
|
||||
s/^want_repo_rev/$2_WANT_REPO_REV/
|
||||
s/^repo_rev/$2_REPO_REV/
|
||||
s/^date/$2_RELEASE_DATE/
|
||||
t print
|
||||
b
|
||||
@ -68,20 +68,20 @@ m4_define([OPAL_GET_VERSION],[
|
||||
$2_VERSION="${$2_VERSION}${$2_GREEK_VERSION}"
|
||||
$2_BASE_VERSION=$$2_VERSION
|
||||
|
||||
if test $$2_WANT_SVN -eq 1 && test $ompi_ver_need_svn -eq 1 ; then
|
||||
if test $$2_WANT_REPO_REV -eq 1 && test $ompi_ver_need_repo_rev -eq 1 ; then
|
||||
if test "$svnversion_result" != "-1" ; then
|
||||
$2_SVN_R=$svnversion_result
|
||||
$2_REPO_REV=$svnversion_result
|
||||
fi
|
||||
if test "$$2_SVN_R" = "-1" ; then
|
||||
if test "$$2_REPO_REV" = "-1" ; then
|
||||
m4_ifdef([AC_MSG_CHECKING],
|
||||
[AC_MSG_CHECKING([for SVN version])])
|
||||
[AC_MSG_CHECKING([for repo version])])
|
||||
d=`date '+%m-%d-%Y'`
|
||||
if test -d "$srcdir/.svn" ; then
|
||||
$2_SVN_R=r`svnversion "$srcdir"`
|
||||
$2_REPO_REV=r`svnversion "$srcdir"`
|
||||
if test $? != 0; then
|
||||
# The following is too long for Fortran
|
||||
# $2_SVN_R="unknown svn version (svnversion not found); $d"
|
||||
$2_SVN_R="? (no svnversion); $d"
|
||||
# $2_REPO_REV="unknown svn version (svnversion not found); $d"
|
||||
$2_REPO_REV="? (no svnversion); $d"
|
||||
fi
|
||||
elif test -d "$srcdir/.hg" ; then
|
||||
# Check to see if we can find the hg command
|
||||
@ -92,20 +92,31 @@ m4_define([OPAL_GET_VERSION],[
|
||||
# found. So test for hg specifically first.
|
||||
hg --version > /dev/null 2>&1
|
||||
if test $? = 0; then
|
||||
$2_SVN_R=hg`hg -v -R "$srcdir" tip | grep ^changeset: | head -n 1 | cut -d: -f3`
|
||||
$2_REPO_REV=hg`hg -v -R "$srcdir" tip | grep ^changeset: | head -n 1 | cut -d: -f3`
|
||||
else
|
||||
# The following is too long for Fortran
|
||||
# $2_SVN_R="unknown hg version (hg not found); $d"
|
||||
$2_SVN_R="? (no hg); $d"
|
||||
# $2_REPO_REV="unknown hg version (hg not found); $d"
|
||||
$2_REPO_REV="? (no hg); $d"
|
||||
fi
|
||||
elif test -d "$srcdir/.git" ; then
|
||||
# By the same logic as above, check to see if we
|
||||
# can find the "git" command.
|
||||
git --version > /dev/null 2>&1
|
||||
if test $? = 0; then
|
||||
$2_REPO_REV=git`git log -1 "$srcdir" | grep ^commit | awk '{ print $2 }'`
|
||||
else
|
||||
# The following is too long for Fortran
|
||||
# $2_REPO_REV="unknown hg version (hg not found); $d"
|
||||
$2_REPO_REV="? (no git); $d"
|
||||
fi
|
||||
fi
|
||||
if test "$2_SVN_R" = ""; then
|
||||
$2_SVN_R="svn$d"
|
||||
if test "$2_REPO_REV" = ""; then
|
||||
$2_REPO_REV="date$d"
|
||||
fi
|
||||
m4_ifdef([AC_MSG_RESULT],
|
||||
[AC_MSG_RESULT([done])])
|
||||
fi
|
||||
$2_VERSION="${$2_VERSION}${$2_SVN_R}"
|
||||
$2_VERSION="${$2_VERSION}${$2_REPO_REV}"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
@ -14,7 +14,7 @@ m4_divert_push([SCRIPT])dnl
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -30,10 +30,10 @@ option="$2"
|
||||
case "$option" in
|
||||
# svnversion can take a while to run. If we don't need it, don't run it.
|
||||
--major|--minor|--release|--greek|--base|--help)
|
||||
ompi_ver_need_svn=0
|
||||
ompi_ver_need_repo_rev=0
|
||||
;;
|
||||
*)
|
||||
ompi_ver_need_svn=1
|
||||
ompi_ver_need_repo_rev=1
|
||||
esac
|
||||
|
||||
|
||||
@ -63,8 +63,8 @@ case "$option" in
|
||||
--greek)
|
||||
echo $OPAL_GREEK_VERSION
|
||||
;;
|
||||
--svn)
|
||||
echo $OPAL_SVN_R
|
||||
--repo-rev)
|
||||
echo $OPAL_REPO_REV
|
||||
;;
|
||||
--base)
|
||||
echo $OPAL_BASE_VERSION
|
||||
@ -73,7 +73,7 @@ case "$option" in
|
||||
echo $OPAL_RELEASE_DATE
|
||||
;;
|
||||
--all)
|
||||
echo ${OPAL_VERSION} ${OPAL_MAJOR_VERSION} ${OPAL_MINOR_VERSION} ${OPAL_RELEASE_VERSION} ${OPAL_GREEK_VERSION} ${OPAL_SVN_R}
|
||||
echo ${OPAL_VERSION} ${OPAL_MAJOR_VERSION} ${OPAL_MINOR_VERSION} ${OPAL_RELEASE_VERSION} ${OPAL_GREEK_VERSION} ${OPAL_REPO_REV}
|
||||
;;
|
||||
-h|--help)
|
||||
cat <<EOF
|
||||
@ -86,9 +86,9 @@ $0 <srcfile> [<option>]
|
||||
--minor - Minor version number
|
||||
--release - Release version number
|
||||
--greek - Greek (alpha, beta, etc) version number
|
||||
--svn - Subversion repository number
|
||||
--repo-rev - Repository version number
|
||||
--all - Show all version numbers, separated by :
|
||||
--base - Show base version number (no svn number)
|
||||
--base - Show base version number (no repo number)
|
||||
--release-date - Show the release date
|
||||
--help - This message
|
||||
EOF
|
||||
|
8
contrib/dist/make_dist_tarball
vendored
8
contrib/dist/make_dist_tarball
vendored
@ -10,7 +10,7 @@
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -343,8 +343,8 @@ version_files=VERSION
|
||||
release_date=`date '+%b %d, %Y'`
|
||||
for file in $version_files; do
|
||||
echo " - $file"
|
||||
sed -e 's/^want_svn=.*/want_svn=0/' \
|
||||
-e 's/^svn_r=.*/'svn_r=$svn_r/ \
|
||||
sed -e 's/^want_repo_rev=.*/want_repo_rev=0/' \
|
||||
-e 's/^repo_rev=.*/'repo_rev=$svn_r/ \
|
||||
-e "s/^date=.*/date=\"$release_date\"/" \
|
||||
$file > $file.new
|
||||
cp -f $file.new $file
|
||||
@ -391,6 +391,8 @@ if test -d .svn; then
|
||||
svn revert VERSION
|
||||
elif test -d .hg; then
|
||||
hg revert VERSION
|
||||
elif test -d .git; then
|
||||
git revert VERSION
|
||||
fi
|
||||
|
||||
echo " "
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -26,8 +27,8 @@
|
||||
#define OMPI_MINOR_VERSION @OMPI_MINOR_VERSION@
|
||||
#define OMPI_RELEASE_VERSION @OMPI_RELEASE_VERSION@
|
||||
#define OMPI_GREEK_VERSION "@OMPI_GREEK_VERSION@"
|
||||
#define OMPI_WANT_SVN @OMPI_WANT_SVN@
|
||||
#define OMPI_SVN_R "@OMPI_SVN_R@"
|
||||
#define OMPI_WANT_REPO_REV @OMPI_WANT_REPO_REV@
|
||||
#define OMPI_REPO_REV "@OMPI_REPO_REV@"
|
||||
#ifdef OMPI_VERSION
|
||||
/* If we included version.h, we want the real version, not the
|
||||
stripped (no-r number) version */
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,7 +40,7 @@ const char *ompi_info_ver_major = "major";
|
||||
const char *ompi_info_ver_minor = "minor";
|
||||
const char *ompi_info_ver_release = "release";
|
||||
const char *ompi_info_ver_greek = "greek";
|
||||
const char *ompi_info_ver_svn = "svn";
|
||||
const char *ompi_info_ver_repo = "repo";
|
||||
|
||||
/*
|
||||
* Private variables
|
||||
@ -61,7 +61,7 @@ static void show_mca_version(const mca_base_component_t *component,
|
||||
static char *make_version_str(const char *scope,
|
||||
int major, int minor, int release,
|
||||
const char *greek,
|
||||
bool want_svn, const char *svn);
|
||||
bool want_repo, const char *repo);
|
||||
|
||||
/*
|
||||
* do_version
|
||||
@ -138,10 +138,10 @@ void ompi_info_show_ompi_version(const char *scope)
|
||||
OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
|
||||
OMPI_RELEASE_VERSION,
|
||||
OMPI_GREEK_VERSION,
|
||||
OMPI_WANT_SVN, OMPI_SVN_R));
|
||||
OMPI_WANT_REPO_REV, OMPI_REPO_REV));
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:svn", ompi_info_type_ompi);
|
||||
ompi_info_out("Open MPI SVN revision", tmp, OMPI_SVN_R);
|
||||
asprintf(&tmp, "%s:version:repo", ompi_info_type_ompi);
|
||||
ompi_info_out("Open MPI repo revision", tmp, OMPI_REPO_REV);
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:release_date", ompi_info_type_ompi);
|
||||
ompi_info_out("Open MPI release date", tmp, OMPI_RELEASE_DATE);
|
||||
@ -153,10 +153,10 @@ void ompi_info_show_ompi_version(const char *scope)
|
||||
ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
|
||||
ORTE_RELEASE_VERSION,
|
||||
ORTE_GREEK_VERSION,
|
||||
ORTE_WANT_SVN, ORTE_SVN_R));
|
||||
ORTE_WANT_REPO_REV, ORTE_REPO_REV));
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:svn", ompi_info_type_orte);
|
||||
ompi_info_out("Open RTE SVN revision", tmp, ORTE_SVN_R);
|
||||
asprintf(&tmp, "%s:version:repo", ompi_info_type_orte);
|
||||
ompi_info_out("Open RTE repo revision", tmp, ORTE_REPO_REV);
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:release_date", ompi_info_type_orte);
|
||||
ompi_info_out("Open RTE release date", tmp, ORTE_RELEASE_DATE);
|
||||
@ -168,10 +168,10 @@ void ompi_info_show_ompi_version(const char *scope)
|
||||
OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
|
||||
OPAL_RELEASE_VERSION,
|
||||
OPAL_GREEK_VERSION,
|
||||
OPAL_WANT_SVN, OPAL_SVN_R));
|
||||
OPAL_WANT_REPO_REV, OPAL_REPO_REV));
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:svn", ompi_info_type_opal);
|
||||
ompi_info_out("OPAL SVN revision", tmp, OPAL_SVN_R);
|
||||
asprintf(&tmp, "%s:version:repo", ompi_info_type_opal);
|
||||
ompi_info_out("OPAL repo revision", tmp, OPAL_REPO_REV);
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:release_date", ompi_info_type_opal);
|
||||
ompi_info_out("OPAL release date", tmp, OPAL_RELEASE_DATE);
|
||||
@ -367,7 +367,7 @@ static void show_mca_version(const mca_base_component_t* component,
|
||||
static char *make_version_str(const char *scope,
|
||||
int major, int minor, int release,
|
||||
const char *greek,
|
||||
bool want_svn, const char *svn)
|
||||
bool want_repo_rev, const char *repo)
|
||||
{
|
||||
char *str = NULL, *tmp;
|
||||
char temp[BUFSIZ];
|
||||
@ -388,8 +388,8 @@ static char *make_version_str(const char *scope,
|
||||
free(str);
|
||||
str = tmp;
|
||||
}
|
||||
if (want_svn && NULL != svn) {
|
||||
asprintf(&tmp, "%s%s", str, svn);
|
||||
if (want_repo_rev && NULL != repo) {
|
||||
asprintf(&tmp, "%s%s", str, repo);
|
||||
free(str);
|
||||
str = tmp;
|
||||
}
|
||||
@ -401,8 +401,8 @@ static char *make_version_str(const char *scope,
|
||||
snprintf(temp, BUFSIZ - 1, "%d", release);
|
||||
} else if (0 == strcmp(scope, ompi_info_ver_greek)) {
|
||||
str = strdup(greek);
|
||||
} else if (0 == strcmp(scope, ompi_info_ver_svn)) {
|
||||
str = strdup(svn);
|
||||
} else if (0 == strcmp(scope, ompi_info_ver_repo)) {
|
||||
str = strdup(repo);
|
||||
}
|
||||
|
||||
if (NULL == str) {
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -26,8 +27,8 @@
|
||||
#define OPAL_MINOR_VERSION @OPAL_MINOR_VERSION@
|
||||
#define OPAL_RELEASE_VERSION @OPAL_RELEASE_VERSION@
|
||||
#define OPAL_GREEK_VERSION "@OPAL_GREEK_VERSION@"
|
||||
#define OPAL_WANT_SVN @OPAL_WANT_SVN@
|
||||
#define OPAL_SVN_R "@OPAL_SVN_R@"
|
||||
#define OPAL_WANT_REPO_REV @OPAL_WANT_REPO_REV@
|
||||
#define OPAL_REPO_REV "@OPAL_REPO_REV@"
|
||||
#ifdef OPAL_VERSION
|
||||
/* If we included version.h, we want the real version, not the
|
||||
stripped (no-r number) verstion */
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -26,8 +27,8 @@
|
||||
#define ORTE_MINOR_VERSION @ORTE_MINOR_VERSION@
|
||||
#define ORTE_RELEASE_VERSION @ORTE_RELEASE_VERSION@
|
||||
#define ORTE_GREEK_VERSION "@ORTE_GREEK_VERSION@"
|
||||
#define ORTE_WANT_SVN @ORTE_WANT_SVN@
|
||||
#define ORTE_SVN_R "@ORTE_SVN_R@"
|
||||
#define ORTE_WANT_REPO_REV @ORTE_WANT_REPO_REV@
|
||||
#define ORTE_REPO_REV "@ORTE_REPO_REV@"
|
||||
#ifdef ORTE_VERSION
|
||||
/* If we included version.h, we want the real version, not the
|
||||
stripped (no-r number) verstion */
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -178,8 +178,8 @@ static char *version_string(void)
|
||||
i = strlen(temp);
|
||||
}
|
||||
|
||||
if (ORTE_WANT_SVN && strlen(ORTE_SVN_R) > 0) {
|
||||
strncat(temp + i, ORTE_SVN_R, sizeof(temp) - i);
|
||||
if (ORTE_WANT_REPO_REV && strlen(ORTE_REPO_REV) > 0) {
|
||||
strncat(temp + i, ORTE_REPO_REV, sizeof(temp) - i);
|
||||
}
|
||||
|
||||
return temp;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,7 +40,7 @@ const char *orte_info_ver_major = "major";
|
||||
const char *orte_info_ver_minor = "minor";
|
||||
const char *orte_info_ver_release = "release";
|
||||
const char *orte_info_ver_greek = "greek";
|
||||
const char *orte_info_ver_svn = "svn";
|
||||
const char *orte_info_ver_repo = "repo";
|
||||
|
||||
/*
|
||||
* Private variables
|
||||
@ -61,7 +61,7 @@ static void show_mca_version(const mca_base_component_t *component,
|
||||
static char *make_version_str(const char *scope,
|
||||
int major, int minor, int release,
|
||||
const char *greek,
|
||||
bool want_svn, const char *svn);
|
||||
bool want_repo, const char *repo);
|
||||
|
||||
/*
|
||||
* do_version
|
||||
@ -139,10 +139,10 @@ void orte_info_show_orte_version(const char *scope)
|
||||
ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
|
||||
ORTE_RELEASE_VERSION,
|
||||
ORTE_GREEK_VERSION,
|
||||
ORTE_WANT_SVN, ORTE_SVN_R));
|
||||
ORTE_WANT_REPO_REV, ORTE_REPO_REV));
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:svn", orte_info_type_orte);
|
||||
orte_info_out("Open RTE SVN revision", tmp, ORTE_SVN_R);
|
||||
asprintf(&tmp, "%s:version:repo", orte_info_type_orte);
|
||||
orte_info_out("Open RTE repo revision", tmp, ORTE_REPO_REV);
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:release_date", orte_info_type_orte);
|
||||
orte_info_out("Open RTE release date", tmp, ORTE_RELEASE_DATE);
|
||||
@ -154,10 +154,10 @@ void orte_info_show_orte_version(const char *scope)
|
||||
OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
|
||||
OPAL_RELEASE_VERSION,
|
||||
OPAL_GREEK_VERSION,
|
||||
OPAL_WANT_SVN, OPAL_SVN_R));
|
||||
OPAL_WANT_REPO_REV, OPAL_REPO_REV));
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:svn", orte_info_type_opal);
|
||||
orte_info_out("OPAL SVN revision", tmp, OPAL_SVN_R);
|
||||
asprintf(&tmp, "%s:version:repo", orte_info_type_opal);
|
||||
orte_info_out("OPAL repo revision", tmp, OPAL_REPO_REV);
|
||||
free(tmp);
|
||||
asprintf(&tmp, "%s:version:release_date", orte_info_type_opal);
|
||||
orte_info_out("OPAL release date", tmp, OPAL_RELEASE_DATE);
|
||||
@ -353,7 +353,7 @@ static void show_mca_version(const mca_base_component_t* component,
|
||||
static char *make_version_str(const char *scope,
|
||||
int major, int minor, int release,
|
||||
const char *greek,
|
||||
bool want_svn, const char *svn)
|
||||
bool want_repo, const char *repo)
|
||||
{
|
||||
char *str = NULL, *tmp;
|
||||
char temp[BUFSIZ];
|
||||
@ -374,8 +374,8 @@ static char *make_version_str(const char *scope,
|
||||
free(str);
|
||||
str = tmp;
|
||||
}
|
||||
if (want_svn && NULL != svn) {
|
||||
asprintf(&tmp, "%s%s", str, svn);
|
||||
if (want_repo && NULL != repo) {
|
||||
asprintf(&tmp, "%s%s", str, repo);
|
||||
free(str);
|
||||
str = tmp;
|
||||
}
|
||||
@ -387,8 +387,8 @@ static char *make_version_str(const char *scope,
|
||||
snprintf(temp, BUFSIZ - 1, "%d", release);
|
||||
} else if (0 == strcmp(scope, orte_info_ver_greek)) {
|
||||
str = strdup(greek);
|
||||
} else if (0 == strcmp(scope, orte_info_ver_svn)) {
|
||||
str = strdup(svn);
|
||||
} else if (0 == strcmp(scope, orte_info_ver_repo)) {
|
||||
str = strdup(repo);
|
||||
}
|
||||
|
||||
if (NULL == str) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user