- Updated versioning system; "svn" number is now a string (vs. an int)
- Updated autogen.sh and friends to be more flexible and allow components to be configured and built outside of the Open MPI tree - Removed $(LIBOMPI_LA) from all component Makefile.am's -- it's unnecessary This commit was SVN r1566.
Этот коммит содержится в:
родитель
fae7333bca
Коммит
8149265189
@ -465,7 +465,6 @@ EOF
|
|||||||
pd_module_name="`basename $pd_dir`"
|
pd_module_name="`basename $pd_dir`"
|
||||||
pd_module_type="`dirname $pd_dir`"
|
pd_module_type="`dirname $pd_dir`"
|
||||||
pd_module_type="`basename $pd_module_type`"
|
pd_module_type="`basename $pd_module_type`"
|
||||||
pd_get_ver="../../../../config/ompi_get_version.sh"
|
|
||||||
pd_ver_file="`grep PARAM_VERSION_FILE configure.params`"
|
pd_ver_file="`grep PARAM_VERSION_FILE configure.params`"
|
||||||
if test -z "$pd_ver_file"; then
|
if test -z "$pd_ver_file"; then
|
||||||
pd_ver_file="VERSION"
|
pd_ver_file="VERSION"
|
||||||
@ -498,6 +497,7 @@ EOF
|
|||||||
|
|
||||||
# Get all the version numbers
|
# Get all the version numbers
|
||||||
|
|
||||||
|
pd_get_ver="../../../../config/ompi_get_version.sh"
|
||||||
pd_ver="`sh $pd_get_ver $pd_ver_file --all`"
|
pd_ver="`sh $pd_get_ver $pd_ver_file --all`"
|
||||||
pd_ver_full="`echo $pd_ver | cut -d: -f1`"
|
pd_ver_full="`echo $pd_ver | cut -d: -f1`"
|
||||||
pd_ver_major="`echo $pd_ver | cut -d: -f2`"
|
pd_ver_major="`echo $pd_ver | cut -d: -f2`"
|
||||||
@ -533,7 +533,7 @@ AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_BETA_VERSION,
|
|||||||
$pd_ver_beta,
|
$pd_ver_beta,
|
||||||
[Beta OMPI MCA $pd_module_type $pd_module_name version])
|
[Beta OMPI MCA $pd_module_type $pd_module_name version])
|
||||||
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_SVN_VERSION,
|
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_SVN_VERSION,
|
||||||
$pd_ver_svn,
|
"$pd_ver_svn",
|
||||||
[SVN OMPI MCA $pd_module_type $pd_module_name version])
|
[SVN OMPI MCA $pd_module_type $pd_module_name version])
|
||||||
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_FULL_VERSION,
|
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_FULL_VERSION,
|
||||||
"$pd_ver_full",
|
"$pd_ver_full",
|
||||||
|
@ -9,11 +9,6 @@ set verfile="$srcdir/VERSION"
|
|||||||
set verscript="config/ompi_get_version.sh"
|
set verscript="config/ompi_get_version.sh"
|
||||||
|
|
||||||
set OMPI_VERSION="`sh $verscript $verfile --full`"
|
set OMPI_VERSION="`sh $verscript $verfile --full`"
|
||||||
set OMPI_MAJOR_VERSION="`sh $verscript $verfile --major`"
|
|
||||||
set OMPI_MINOR_VERSION="`sh $verscript $verfile --minor`"
|
|
||||||
set OMPI_RELEASE_VERSION="`sh $verscript $verfile --release`"
|
|
||||||
set OMPI_ALPHA_VERSION="`sh $verscript $verfile --alpha`"
|
|
||||||
set OMPI_BETA_VERSION="`sh $verscript $verfile --beta`"
|
|
||||||
|
|
||||||
if ("$distdir" == "") then
|
if ("$distdir" == "") then
|
||||||
echo "Must supply relative distdir as argv[1] -- aborting"
|
echo "Must supply relative distdir as argv[1] -- aborting"
|
||||||
|
@ -14,19 +14,10 @@ AC_INIT(@PARAM_INIT_FILE@)
|
|||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
AC_CONFIG_AUX_DIR(@PARAM_CONFIG_AUX_DIR@)
|
AC_CONFIG_AUX_DIR(@PARAM_CONFIG_AUX_DIR@)
|
||||||
|
|
||||||
# Establish the top-level OMPI directory
|
|
||||||
|
|
||||||
top_ompi_srcdir='$(top_srcdir)/../../../..'
|
|
||||||
top_ompi_builddir='$(top_builddir)/../../../..'
|
|
||||||
|
|
||||||
AC_SUBST(top_ompi_srcdir)
|
|
||||||
AC_SUBST(top_ompi_builddir)
|
|
||||||
|
|
||||||
# Get the version of @MCA_TYPE@ @MCA_MODULE_NAME@ that we are installing.
|
# Get the version of @MCA_TYPE@ @MCA_MODULE_NAME@ that we are installing.
|
||||||
|
|
||||||
if test -n "@PARAM_VERSION_FILE@" -a -f "@PARAM_VERSION_FILE@"; then
|
if test -n "@PARAM_VERSION_FILE@" -a -f "@PARAM_VERSION_FILE@"; then
|
||||||
OMPI_GET_VERSION($srcdir/../../../../config, @PARAM_VERSION_FILE@,
|
OMPI_GET_VERSION(@PARAM_VERSION_FILE@, @PARAM_VAR_PREFIX@)
|
||||||
@PARAM_VAR_PREFIX@)
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION,
|
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION,
|
||||||
$@PARAM_VAR_PREFIX@_MAJOR_VERSION,
|
$@PARAM_VAR_PREFIX@_MAJOR_VERSION,
|
||||||
@ -76,7 +67,7 @@ AH_TOP([/* -*- c -*-
|
|||||||
*
|
*
|
||||||
* $HEADER$
|
* $HEADER$
|
||||||
*
|
*
|
||||||
* OMPI/MPI configuation header file.
|
* Open MPI configuation header file.
|
||||||
* MCA @MCA_TYPE@: @MCA_MODULE_NAME@ module
|
* MCA @MCA_TYPE@: @MCA_MODULE_NAME@ module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -114,20 +105,28 @@ AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_DEFAULT, $want_default,
|
|||||||
AC_MSG_RESULT([$result])
|
AC_MSG_RESULT([$result])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check and see if the user wants this module built as a run-time
|
# Part one of libtool magic
|
||||||
# loadable module. Acceptable combinations:
|
|
||||||
#
|
|
||||||
# [default -- no option]
|
|
||||||
# --with-modules
|
|
||||||
# --with-modules=[.+,]*MODULE_TYPE[.+,]*
|
|
||||||
# --with-modules=[.+,]*MODULE_TYPE-MODULE_NAME[.+,]*
|
|
||||||
# --without-modules
|
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_MSG_CHECKING([if want module to be run-time loadable])
|
AM_ENABLE_SHARED
|
||||||
AC_ARG_WITH(modules,
|
AM_DISABLE_STATIC
|
||||||
AC_HELP_STRING([--with-modules=name],
|
|
||||||
[if name is "@MCA_TYPE@-@MCA_MODULE_NAME@", then @MCA_MODULE_NAME@ will be compiled as a loadable module (if supported on this platform). This directly implies "--enable-shared=@MCA_TYPE@-@MCA_MODULE_NAME@ --disable-static=@MCA_TYPE@-@MCA_MODULE_NAME@"]))
|
|
||||||
|
#
|
||||||
|
# Find which modules should be built as run-time loadable modules
|
||||||
|
# Acceptable combinations:
|
||||||
|
#
|
||||||
|
# [default -- no option given]
|
||||||
|
# --enable-mca-dso
|
||||||
|
# --enable-mca-dso=[.+,]*COMPONENT_TYPE[.+,]*
|
||||||
|
# --enable-mca-dso=[.+,]*COMPONENT_TYPE-COMPONENT_NAME[.+,]*
|
||||||
|
# --disable-mca-dso
|
||||||
|
#
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if want component to be a DSO])
|
||||||
|
AC_ARG_ENABLE(mca-dso,
|
||||||
|
AC_HELP_STRING([--enable-mca-dso=LIST],
|
||||||
|
[comma-separated list of types and/or type-component pairs that will be built as run-time loadable modules (as opposed to statically linked in), if supported on this platform. The default is to build all components as DSOs; the --disable-mca-dso[=LIST] form can be used to disable building all or some types/components as DSOs]. If LIST is "@MCA_TYPE@-@MCA_MODULE_NAME@" or "@MCA_MODULENAME@", then @MCA_MODULE_NAME@ will be compiled as a DSO (if supported on this platform).))
|
||||||
|
|
||||||
# Manual conversion of $kind to its generic name (e.g., crmpi->cr,
|
# Manual conversion of $kind to its generic name (e.g., crmpi->cr,
|
||||||
# crompi->cr).
|
# crompi->cr).
|
||||||
@ -144,19 +143,22 @@ crompi)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=0
|
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_DSO=0
|
||||||
msg=no
|
msg=no
|
||||||
if test "$with_modules" = "yes" -o \
|
|
||||||
"$with_modules" = "@MCA_TYPE@" -o "$with_modules" = "$generic_type"; then
|
if test "$enable_shared" = "no"; then
|
||||||
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=1
|
msg=no
|
||||||
|
elif test -z "$enable_mca_dso" -o "$enable_mca_dso" = "yes" -o \
|
||||||
|
"$enable_mca_dso" = "@MCA_TYPE@" -o "$enable_mca_dso" = "$generic_type"; then
|
||||||
|
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_DSO=1
|
||||||
msg=yes
|
msg=yes
|
||||||
elif test "$with_modules" != "no"; then
|
else
|
||||||
ifs_save="$IFS"
|
ifs_save="$IFS"
|
||||||
IFS="${IFS}$PATH_SEPARATOR,"
|
IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
for module in $with_modules; do
|
for item in $enable_mca_dso; do
|
||||||
if test "$module" = "@MCA_TYPE@-@MCA_MODULE_NAME@" -o \
|
if test "$item" = "@MCA_TYPE@-@MCA_MODULE_NAME@" -o \
|
||||||
"$module" = "@MCA_TYPE@" -o "$module" = "$generic_type"; then
|
"$item" = "@MCA_TYPE@" -o "$item" = "$generic_type"; then
|
||||||
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=1
|
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_DSO=1
|
||||||
msg=yes
|
msg=yes
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -166,24 +168,6 @@ AC_MSG_RESULT([$msg])
|
|||||||
unset msg
|
unset msg
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Part one of libtool magic
|
|
||||||
#
|
|
||||||
|
|
||||||
AM_ENABLE_SHARED
|
|
||||||
AM_DISABLE_STATIC
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Now, if we're building the run-time loadable module, bypass those
|
|
||||||
# defaults and reset them to shared=yes, static=no.
|
|
||||||
#
|
|
||||||
|
|
||||||
if test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE" = "1"; then
|
|
||||||
enable_shared=yes
|
|
||||||
enable_static=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Check for compilers and preprocessors
|
# Check for compilers and preprocessors
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -195,26 +179,145 @@ fi
|
|||||||
@C_COMPILER_SETUP@
|
@C_COMPILER_SETUP@
|
||||||
@CXX_COMPILER_SETUP@
|
@CXX_COMPILER_SETUP@
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# Find Open MPI header files
|
||||||
|
##################################
|
||||||
|
|
||||||
|
# Are we building as part of the Open MPI source tree, or outside of it?
|
||||||
|
|
||||||
|
AC_ARG_WITH(openmpi,
|
||||||
|
AC_HELP_STRING([--with-openmpi=DIR],
|
||||||
|
[specify the location of the Open MPI header files and library. The default is to build within a source tree or be able to find the headers/library without additional CPPFLAGS/LDFLAGS. This option is generally only necessary when components are being configured/built outside of an Open MPI source tree]))
|
||||||
|
|
||||||
|
# Establish the top-level OMPI directory. If --with-openmpi was not
|
||||||
|
# specified, then see if we're building a) within an Open MPI source
|
||||||
|
# tree, or b) can find the Open MPI headers and library file without
|
||||||
|
# any additional CPPFLAGS/LDFLAGS.
|
||||||
|
|
||||||
|
top_ompi_srcdir=
|
||||||
|
top_ompi_builddir=
|
||||||
|
found_ompi_headers=
|
||||||
|
|
||||||
|
# Split this into multiple tests because we may have multiple
|
||||||
|
# possibilities here:
|
||||||
|
#
|
||||||
|
# - build in the Open MPI source tree
|
||||||
|
# - build outside of the Open MPI source tree, and have valid
|
||||||
|
# --with-openmpi
|
||||||
|
# - build outside of the Open MPI source tree, and not have a valid
|
||||||
|
# --with-openmpi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for Open MPI header files])
|
||||||
|
|
||||||
|
# First case: we do not have --with-openmpi, so check and see if we're
|
||||||
|
# building inside the Open MPI source tree
|
||||||
|
|
||||||
|
if test -z "$with_openmpi"; then
|
||||||
|
|
||||||
|
# Are we within an Open MPI source tree?
|
||||||
|
|
||||||
|
if test -f "$srcdir/../../../../config/mca_configure.ac"; then
|
||||||
|
|
||||||
|
# This is needed for VPATH builds, so that it will -I the
|
||||||
|
# appropriate include directory (don't know why automake
|
||||||
|
# doesn't do this # automatically).
|
||||||
|
|
||||||
|
top_ompi_srcdir='$(top_srcdir)/../../../..'
|
||||||
|
top_ompi_builddir='$(top_builddir)/../../../..'
|
||||||
|
INCFLAGS='-I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/include -I$(top_ompi_builddir)/src'
|
||||||
|
found_ompi_headers=1
|
||||||
|
AC_MSG_RESULT([already in Open MPI source tree])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we haven't found the headers yet, then we know that we're *not*
|
||||||
|
# building within the Open MPI source tree.
|
||||||
|
|
||||||
|
if test -z "$found_ompi_headers"; then
|
||||||
|
top_ompi_srcdir="unused -- building outside of Open MPI source tree"
|
||||||
|
top_ompi_builddir="$top_ompi_srcdir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Now see if a) we haven't found the headers yet, and b) we have
|
||||||
|
# --with-openmpi
|
||||||
|
|
||||||
|
if test -z "$found_ompi_headers"; then
|
||||||
|
|
||||||
|
# We're outside the Open MPI build tree, and we have been provided
|
||||||
|
# a top-level directory where the header files live.
|
||||||
|
|
||||||
|
if test -n "$with_openmpi"; then
|
||||||
|
if -d "$with_opemnpi"; then
|
||||||
|
if test -d "$with_openmpi/openmpi" -a \
|
||||||
|
-f "$with_openmpi/openmpi/include/ompi.h"; then
|
||||||
|
INCFLAGS="-I$with_openmpi/openmpi"
|
||||||
|
found_ompi_headers=1
|
||||||
|
AC_MSG_RESULT([$with_openmpi/openmpi])
|
||||||
|
elif test -f "$with_openmpi/include/ompi.h"; then
|
||||||
|
INCFLAGS="-I$with_openmpi"
|
||||||
|
found_ompi_headers=1
|
||||||
|
AC_MSG_RESULT([$with_openmpi])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([got bogus --with-openmpi value])
|
||||||
|
AC_MSG_WARN([*** Directory $with_openmpi exists])
|
||||||
|
AC_MSG_WARN([*** But cannot seem to find Open MPI headers in it])
|
||||||
|
AC_MSG_WARN([*** Looking elsewhere...])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([got bogus --with-openmpi value])
|
||||||
|
AC_MSG_WARN([*** Directory $with_openmpi does not seem to exist])
|
||||||
|
AC_MSG_WARN([*** Trying to find Open MPI headers without it...])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we've gotten this far and haven't found the Open MPI headers
|
||||||
|
# yet, then just try compiling a C program with some of the Open
|
||||||
|
# MPI headers and see if they're found (i.e., if they're in the
|
||||||
|
# preprocessor's default search path)
|
||||||
|
|
||||||
|
if test -z "$found_ompi_headers"; then
|
||||||
|
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include "include/ompi.h"]],
|
||||||
|
[[]]),
|
||||||
|
[found_ompi_headers=1])
|
||||||
|
if test -n "$found_ompi_headers"; then
|
||||||
|
AC_MSG_RESULT([default preprocessor path])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we got this far and haven't found the Open MPI headers, stick a
|
||||||
|
# fork in us, 'cause we're done.
|
||||||
|
|
||||||
|
if test -z "$found_ompi_headers"; then
|
||||||
|
AC_MSG_WARN([*** Could not find the Open MPI headers])
|
||||||
|
AC_MSG_ERROR([*** Cannot continue])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(top_ompi_srcdir)
|
||||||
|
AC_SUBST(top_ompi_builddir)
|
||||||
|
|
||||||
##################################
|
##################################
|
||||||
# @MCA_TYPE@ @MCA_MODULE_NAME@ module specific setup
|
# @MCA_TYPE@ @MCA_MODULE_NAME@ module specific setup
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
|
# Have at least one statement (well, m4 macro) in each "if" block so
|
||||||
|
# that some older sh flavors don't complain.
|
||||||
|
|
||||||
if test "$OMPI_WANT_DIST" = "no"; then
|
if test "$OMPI_WANT_DIST" = "no"; then
|
||||||
|
OMPI_LOG_MSG([Running configure stub macro])
|
||||||
@CONFIGURE_STUB_MACRO@
|
@CONFIGURE_STUB_MACRO@
|
||||||
else
|
else
|
||||||
|
OMPI_LOG_MSG([Running configure dist stub macro])
|
||||||
@CONFIGURE_DIST_STUB_MACRO@
|
@CONFIGURE_DIST_STUB_MACRO@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# This is needed for VPATH builds, so that it will -I the appropriate
|
# We delayed doing it until now just so that long include paths don't
|
||||||
# include directory (don't know why automake doesn't do this
|
# show up in any of the configure output -- purely aesthetic.
|
||||||
# automatically). We delayed doing it until now just so that
|
|
||||||
# '-I$(top_srcdir)' doesn't show up in any of the configure output --
|
|
||||||
# purely aesthetic.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
CPPFLAGS='-I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/include -I$(top_ompi_builddir)/src'" $CPPFLAGS"
|
CPPFLAGS="$CPPFLAGS $INCFLAGS"
|
||||||
CXXCPPFLAGS='-I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/include -I$(top_ompi_builddir)/src'" $CXXCPPFLAGS"
|
CXXCPPFLAGS="$CXXCPPFLAGS $INCFLAGS"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -223,6 +326,7 @@ CXXCPPFLAGS='-I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/include -I$(top_ompi_
|
|||||||
#
|
#
|
||||||
|
|
||||||
AC_SUBST(CPPFLAGS)
|
AC_SUBST(CPPFLAGS)
|
||||||
|
AC_SUBST(CXXCPPFLAGS)
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -233,7 +337,7 @@ ompi_show_subtitle "GNU libtool setup"
|
|||||||
|
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
AM_CONDITIONAL(OMPI_BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_DSO,
|
AM_CONDITIONAL(OMPI_BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_DSO,
|
||||||
test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE" = "1")
|
test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_DSO" = "1")
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
@ -3,30 +3,70 @@ dnl
|
|||||||
dnl $HEADER$
|
dnl $HEADER$
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl This file is almost identical in functionality to
|
||||||
|
dnl ompi_get_version.sh. It is unfortunate that we have to duplicate code,
|
||||||
|
dnl but it is really the only what that I can think to do it. :-( Hence,
|
||||||
|
dnl if you change the logic here for determining version numbers, YOU MUST
|
||||||
|
dnl ALSO CHANGE IT IN ompi_get_version.sh!!
|
||||||
|
dnl
|
||||||
|
|
||||||
AC_DEFUN([OMPI_GET_VERSION],[
|
AC_DEFUN([OMPI_GET_VERSION],[
|
||||||
gv_glv_dir="$1"
|
gv_ver_file="$1"
|
||||||
gv_ver_file="$2"
|
gv_prefix="$2"
|
||||||
gv_prefix="$3"
|
|
||||||
|
|
||||||
# Find the get_ompi_version program
|
|
||||||
|
|
||||||
gv_prog="sh $gv_glv_dir/ompi_get_version.sh $gv_ver_file"
|
|
||||||
|
|
||||||
dnl quote eval to suppress macro expansion with non-GNU m4
|
dnl quote eval to suppress macro expansion with non-GNU m4
|
||||||
|
|
||||||
gv_run() {
|
gv_run() {
|
||||||
[eval] ${gv_prefix}_${2}=`$gv_prog --${1}`
|
str="${gv_prefix}_${2}=\$gv_${1}_version"
|
||||||
|
[eval] $str
|
||||||
}
|
}
|
||||||
|
|
||||||
gv_run full VERSION
|
if test -n "$gv_ver_file" -a -f "$gv_ver_file"; then
|
||||||
gv_run major MAJOR_VERSION
|
echo getting version
|
||||||
gv_run minor MINOR_VERSION
|
gv_major_version="`cat $gv_ver_file | grep major | cut -d= -f2`"
|
||||||
gv_run release RELEASE_VERSION
|
gv_minor_version="`cat $gv_ver_file | grep minor | cut -d= -f2`"
|
||||||
gv_run alpha ALPHA_VERSION
|
gv_release_version="`cat $gv_ver_file | grep release | cut -d= -f2`"
|
||||||
gv_run beta BETA_VERSION
|
gv_alpha_version="`cat $gv_ver_file | grep alpha | cut -d= -f2`"
|
||||||
gv_run svn SVN_VERSION
|
gv_beta_version="`cat $gv_ver_file | grep beta | cut -d= -f2`"
|
||||||
|
gv_svn_version="`cat $gv_ver_file | grep svn | 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"
|
||||||
|
else
|
||||||
|
gv_full_version="$gv_major_version.$gv_minor_version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "`expr $gv_alpha_version \> 0`" = "1"; then
|
||||||
|
gv_full_version="${gv_full_version}a$gv_alpha_version"
|
||||||
|
elif test "`expr $gv_beta_version \> 0`" = "1"; 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'`"
|
||||||
|
fi
|
||||||
|
gv_svn_version="$ver"
|
||||||
|
gv_full_version="${gv_full_version}$ver"
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|
||||||
unset gv_glv_dir gv_ver_file gv_prefix gv_prog gv_run
|
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
|
||||||
])
|
])
|
||||||
|
@ -2,10 +2,13 @@
|
|||||||
#
|
#
|
||||||
# $HEADER$
|
# $HEADER$
|
||||||
#
|
#
|
||||||
# Since we do this in multiple places, it's worth putting in a
|
|
||||||
# separate shell script. Very primitive script to get the version
|
#
|
||||||
# number of OMPI into a coherent variable. Can query for any of the
|
# This file is almost identical in functionality to
|
||||||
# individual parts of the version number, too.
|
# ompi_get_version.sh. It is unfortunate that we have to duplicate code,
|
||||||
|
# but it is really the only what that I can think to do it. :-( Hence,
|
||||||
|
# if you change the logic here for determining version numbers, YOU MUST
|
||||||
|
# ALSO CHANGE IT IN ompi_get_version.sh!!
|
||||||
#
|
#
|
||||||
|
|
||||||
srcfile="$1"
|
srcfile="$1"
|
||||||
@ -32,12 +35,9 @@ else
|
|||||||
OMPI_VERSION="${OMPI_VERSION}b$OMPI_BETA_VERSION"
|
OMPI_VERSION="${OMPI_VERSION}b$OMPI_BETA_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$OMPI_SVN_VERSION" = "1"; then
|
if test "$OMPI_SVN_VERSION" != "0"; then
|
||||||
OMPI_VERSION="${OMPI_VERSION}svn"
|
|
||||||
elif test "`expr $OMPI_SVN_VERSION \> 0`" = "1"; then
|
|
||||||
if test -d .svn; then
|
if test -d .svn; then
|
||||||
# ver="r`svn info . | grep Revision | cut -d\ -f 2`"
|
ver=`svnversion .`
|
||||||
ver="r`svnversion .`"
|
|
||||||
else
|
else
|
||||||
ver="svn`date '+%m%d%Y'`"
|
ver="svn`date '+%m%d%Y'`"
|
||||||
fi
|
fi
|
||||||
|
@ -16,7 +16,7 @@ AC_CONFIG_AUX_DIR(./config)
|
|||||||
|
|
||||||
# Get the version of OMPI that we are installing
|
# Get the version of OMPI that we are installing
|
||||||
|
|
||||||
OMPI_GET_VERSION($srcdir/config, $srcdir/VERSION, OMPI)
|
OMPI_GET_VERSION($srcdir/VERSION, OMPI)
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(OMPI_MAJOR_VERSION, $OMPI_MAJOR_VERSION,
|
AC_DEFINE_UNQUOTED(OMPI_MAJOR_VERSION, $OMPI_MAJOR_VERSION,
|
||||||
[Major OMPI version])
|
[Major OMPI version])
|
||||||
@ -28,7 +28,7 @@ AC_DEFINE_UNQUOTED(OMPI_ALPHA_VERSION, $OMPI_ALPHA_VERSION,
|
|||||||
[Alpha OMPI version])
|
[Alpha OMPI version])
|
||||||
AC_DEFINE_UNQUOTED(OMPI_BETA_VERSION, $OMPI_BETA_VERSION,
|
AC_DEFINE_UNQUOTED(OMPI_BETA_VERSION, $OMPI_BETA_VERSION,
|
||||||
[Beta OMPI version])
|
[Beta OMPI version])
|
||||||
AC_DEFINE_UNQUOTED(OMPI_SVN_VERSION, $OMPI_SVN_VERSION,
|
AC_DEFINE_UNQUOTED(OMPI_SVN_VERSION, "$OMPI_SVN_VERSION",
|
||||||
[SVN OMPI revision number])
|
[SVN OMPI revision number])
|
||||||
AC_DEFINE_UNQUOTED(OMPI_VERSION, "$OMPI_VERSION",
|
AC_DEFINE_UNQUOTED(OMPI_VERSION, "$OMPI_VERSION",
|
||||||
[Overall OMPI version number])
|
[Overall OMPI version number])
|
||||||
|
@ -26,7 +26,6 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_allocator_bucket_la_SOURCES = $(sources)
|
mca_allocator_bucket_la_SOURCES = $(sources)
|
||||||
mca_allocator_bucket_la_LIBADD = $(LIBOMPI_LA)
|
|
||||||
mca_allocator_bucket_la_LDFLAGS = -module -avoid-version
|
mca_allocator_bucket_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_io_romio_la_SOURCES =
|
mca_io_romio_la_SOURCES =
|
||||||
mca_io_romio_la_LIBADD = src/libmca_io_romio.la $(LIBOMPI_LA)
|
mca_io_romio_la_LIBADD = src/libmca_io_romio.la
|
||||||
mca_io_romio_la_LDFLAGS = -module -avoid-version
|
mca_io_romio_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -28,7 +28,6 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_mpool_sm_la_SOURCES = $(sources)
|
mca_mpool_sm_la_SOURCES = $(sources)
|
||||||
mca_mpool_sm_la_LIBADD = $(LIBOMPI_LA)
|
|
||||||
mca_mpool_sm_la_LDFLAGS = -module -avoid-version
|
mca_mpool_sm_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_oob_cofs_la_SOURCES =
|
mca_oob_cofs_la_SOURCES =
|
||||||
mca_oob_cofs_la_LIBADD = src/libmca_oob_cofs.la $(LIBOMPI_LA)
|
mca_oob_cofs_la_LIBADD = src/libmca_oob_cofs.la
|
||||||
mca_oob_cofs_la_LDFLAGS = -module -avoid-version
|
mca_oob_cofs_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_pcm_cofs_la_SOURCES =
|
mca_pcm_cofs_la_SOURCES =
|
||||||
mca_pcm_cofs_la_LIBADD = src/libmca_pcm_cofs.la $(LIBOMPI_LA)
|
mca_pcm_cofs_la_LIBADD = src/libmca_pcm_cofs.la
|
||||||
mca_pcm_cofs_la_LDFLAGS = -module -avoid-version
|
mca_pcm_cofs_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_pcm_rsh_la_SOURCES =
|
mca_pcm_rsh_la_SOURCES =
|
||||||
mca_pcm_rsh_la_LIBADD = src/libmca_pcm_rsh.la $(LIBOMPI_LA)
|
mca_pcm_rsh_la_LIBADD = src/libmca_pcm_rsh.la
|
||||||
mca_pcm_rsh_la_LDFLAGS = -module -avoid-version
|
mca_pcm_rsh_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_pml_teg_la_SOURCES =
|
mca_pml_teg_la_SOURCES =
|
||||||
mca_pml_teg_la_LIBADD = src/libmca_pml_teg.la $(LIBOMPI_LA)
|
mca_pml_teg_la_LIBADD = src/libmca_pml_teg.la
|
||||||
mca_pml_teg_la_LDFLAGS = -module -avoid-version
|
mca_pml_teg_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -29,7 +29,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_ptl_elan_la_SOURCES =
|
mca_ptl_elan_la_SOURCES =
|
||||||
mca_ptl_elan_la_LIBADD = src/libmca_ptl_elan.la $(LIBOMPI_LA)
|
mca_ptl_elan_la_LIBADD = src/libmca_ptl_elan.la
|
||||||
mca_ptl_elan_la_LDFLAGS = -module -avoid-version
|
mca_ptl_elan_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_ptl_gm_la_SOURCES =
|
mca_ptl_gm_la_SOURCES =
|
||||||
mca_ptl_gm_la_LIBADD = src/libmca_ptl_gm.la $(LIBOMPI_LA)
|
mca_ptl_gm_la_LIBADD = src/libmca_ptl_gm.la
|
||||||
mca_ptl_gm_la_LDFLAGS = -module -avoid-version
|
mca_ptl_gm_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_ptl_self_la_SOURCES =
|
mca_ptl_self_la_SOURCES =
|
||||||
mca_ptl_self_la_LIBADD = src/libmca_ptl_self.la $(LIBOMPI_LA)
|
mca_ptl_self_la_LIBADD = src/libmca_ptl_self.la
|
||||||
mca_ptl_self_la_LDFLAGS = -module -avoid-version
|
mca_ptl_self_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_ptl_sm_la_SOURCES =
|
mca_ptl_sm_la_SOURCES =
|
||||||
mca_ptl_sm_la_LIBADD = src/libmca_ptl_sm.la $(LIBOMPI_LA)
|
mca_ptl_sm_la_LIBADD = src/libmca_ptl_sm.la
|
||||||
mca_ptl_sm_la_LDFLAGS = -module -avoid-version
|
mca_ptl_sm_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -25,7 +25,7 @@ endif
|
|||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_ptl_tcp_la_SOURCES =
|
mca_ptl_tcp_la_SOURCES =
|
||||||
mca_ptl_tcp_la_LIBADD = src/libmca_ptl_tcp.la $(LIBOMPI_LA)
|
mca_ptl_tcp_la_LIBADD = src/libmca_ptl_tcp.la
|
||||||
mca_ptl_tcp_la_LDFLAGS = -module -avoid-version
|
mca_ptl_tcp_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
|
@ -46,7 +46,7 @@ static void show_mca_version(const mca_base_module_t *module,
|
|||||||
const string& scope, const string& ver_type);
|
const string& scope, const string& ver_type);
|
||||||
static string make_version_str(const string& scope,
|
static string make_version_str(const string& scope,
|
||||||
int major, int minor, int release, int alpha,
|
int major, int minor, int release, int alpha,
|
||||||
int beta, int svn);
|
int beta, const string& svn);
|
||||||
|
|
||||||
//
|
//
|
||||||
// do_version
|
// do_version
|
||||||
@ -111,7 +111,8 @@ void ompi_info::show_ompi_version(const string& scope)
|
|||||||
make_version_str(scope,
|
make_version_str(scope,
|
||||||
OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
|
OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
|
||||||
OMPI_RELEASE_VERSION,
|
OMPI_RELEASE_VERSION,
|
||||||
OMPI_ALPHA_VERSION, OMPI_BETA_VERSION, OMPI_SVN_VERSION));
|
OMPI_ALPHA_VERSION, OMPI_BETA_VERSION,
|
||||||
|
OMPI_SVN_VERSION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -182,14 +183,14 @@ static void show_mca_version(const mca_base_module_t* module,
|
|||||||
|
|
||||||
mca_version = make_version_str(scope, module->mca_major_version,
|
mca_version = make_version_str(scope, module->mca_major_version,
|
||||||
module->mca_minor_version,
|
module->mca_minor_version,
|
||||||
module->mca_release_version, 0, 0, 0);
|
module->mca_release_version, 0, 0, "");
|
||||||
api_version = make_version_str(scope, module->mca_type_major_version,
|
api_version = make_version_str(scope, module->mca_type_major_version,
|
||||||
module->mca_type_minor_version,
|
module->mca_type_minor_version,
|
||||||
module->mca_type_release_version, 0, 0, 0);
|
module->mca_type_release_version, 0, 0, "");
|
||||||
module_version = make_version_str(scope, module->mca_module_major_version,
|
module_version = make_version_str(scope, module->mca_module_major_version,
|
||||||
module->mca_module_minor_version,
|
module->mca_module_minor_version,
|
||||||
module->mca_module_release_version,
|
module->mca_module_release_version,
|
||||||
0, 0, 0);
|
0, 0, "");
|
||||||
|
|
||||||
if (pretty) {
|
if (pretty) {
|
||||||
message = "MCA ";
|
message = "MCA ";
|
||||||
@ -232,7 +233,7 @@ static void show_mca_version(const mca_base_module_t* module,
|
|||||||
|
|
||||||
static string make_version_str(const string& scope,
|
static string make_version_str(const string& scope,
|
||||||
int major, int minor, int release, int alpha,
|
int major, int minor, int release, int alpha,
|
||||||
int beta, int svn)
|
int beta, const string& svn)
|
||||||
{
|
{
|
||||||
string str;
|
string str;
|
||||||
char temp[BUFSIZ];
|
char temp[BUFSIZ];
|
||||||
@ -253,12 +254,8 @@ static string make_version_str(const string& scope,
|
|||||||
snprintf(temp, BUFSIZ - 1, "b%d", beta);
|
snprintf(temp, BUFSIZ - 1, "b%d", beta);
|
||||||
str += temp;
|
str += temp;
|
||||||
}
|
}
|
||||||
if (svn > 0) {
|
if (!svn.empty()) {
|
||||||
str += "svn";
|
str += svn;
|
||||||
if (svn > 1) {
|
|
||||||
snprintf(temp, BUFSIZ - 1, "%d", svn);
|
|
||||||
str += temp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (scope == ver_major)
|
} else if (scope == ver_major)
|
||||||
snprintf(temp, BUFSIZ - 1, "%d", major);
|
snprintf(temp, BUFSIZ - 1, "%d", major);
|
||||||
@ -271,7 +268,7 @@ static string make_version_str(const string& scope,
|
|||||||
else if (scope == ver_beta)
|
else if (scope == ver_beta)
|
||||||
snprintf(temp, BUFSIZ - 1, "%d", beta);
|
snprintf(temp, BUFSIZ - 1, "%d", beta);
|
||||||
else if (scope == ver_svn)
|
else if (scope == ver_svn)
|
||||||
snprintf(temp, BUFSIZ - 1, "%d", svn);
|
str = svn;
|
||||||
else {
|
else {
|
||||||
#if 0
|
#if 0
|
||||||
show_help("ompi_info", "usage");
|
show_help("ompi_info", "usage");
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user