1
1

* Fix a small bug George noticed - if you change the prefix (or any of the

installation directories) in configure, the files that depend on this
  information are not properly rebuilt.  If you need this information,
  don't setup a -D in the Makefile.am - instead, include 
  opal/install_dirs.h.
* Use the : option in AC_CONFIG_FILES to avoid needing to expose that
  we are playing around with temporary files with our headers to avoid
  rebuilding
* Clean up the version file information a bit, and like the install 
  directory stuff, make sure that there is a dependency so that 
  ompi_info gets rebuilt properly when a version number changes.

This commit was SVN r9256.
Этот коммит содержится в:
Brian Barrett 2006-03-12 04:35:01 +00:00
родитель 6b0069b820
Коммит c42da09796
35 изменённых файлов: 472 добавлений и 161 удалений

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

@ -87,6 +87,8 @@ m4_include(config/ompi_setup_f90.m4)
m4_include(config/ompi_setup_libevent.m4)
m4_include(config/ompi_setup_wrappers.m4)
m4_include(config/ompi_make_stripped_flags.m4)
m4_include(config/ompi_install_dirs.m4)
m4_include(config/ompi_save_version.m4)
m4_include(config/ompi_check_pthread_pids.m4)
m4_include(config/ompi_config_pthreads.m4)

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

@ -37,6 +37,7 @@ dnl
m4_define([OMPI_GET_VERSION],[
: ${ompi_ver_need_svn=1}
: ${srcdir=.}
: ${svnversion_result=-1}
dnl quote eval to suppress macro expansion with non-GNU m4
if test -f "$1"; then
@ -64,7 +65,10 @@ m4_define([OMPI_GET_VERSION],[
$2_BASE_VERSION=$$2_VERSION
if test $$2_WANT_SVN -eq 1 && test $ompi_ver_need_svn -eq 1 ; then
if test $$2_SVN_R -eq -1 ; then
if test "$svnversion_result" != "-1" ; then
$2_SVN_R=$svnversion_result
fi
if test "$$2_SVN_R" = "-1" ; then
m4_ifdef([AC_MSG_CHECKING],
[AC_MSG_CHECKING([for SVN version])])
if test -d "$srcdir/.svn" ; then
@ -73,6 +77,7 @@ m4_define([OMPI_GET_VERSION],[
if test $? -ne 0 ; then
$2_SVN_R=svn`date '+%m%d%Y'`
fi
svnversion_result="$$2_SVN_R"
else
$2_SVN_R=svn`date '+%m%d%Y'`
fi

81
config/ompi_install_dirs.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,81 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_INSTALL_DIRS(header_file)
# ------------------------------
# Write out the installation directories into a header file that is
# written by AC_SUBST so that files that depend on hard-coded paths
# can include it and be rebuilt when paths change. We don't AC_DEFINE
# because we don't want to rebuild the entire tree just because
# someone changed the prefix.
AC_DEFUN([OMPI_INSTALL_DIRS], [
ompi_exec_prefix_save="$exec_prefix"
# need to temporarily expand this out as almost exactly as it will
# be done later so that NONE doesn't show up in the
# exec_prefix-based variables. We don't use '${prefix}' because
# we don't want to have to double evaluate those variables.
test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
OPAL_PREFIX="$prefix"
OPAL_EXEC_PREFIX="$exec_prefix"
eval OPAL_BINDIR="$bindir"
eval OPAL_SBINDIR="$sbindir"
eval OPAL_LIBEXECDIR="$libexecdir"
eval OPAL_DATADIR="$datadir"
eval OPAL_SYSCONFDIR="$sysconfdir"
eval OPAL_SHAREDSTATEDIR="$sharedstatedir"
eval OPAL_LOCALSTATEDIR="$localstatedir"
eval OPAL_LIBDIR="$libdir"
eval OPAL_INCLUDEDIR="$includedir"
eval OPAL_INFODIR="$infodir"
eval OPAL_MANDIR="$mandir"
AC_SUBST(OPAL_PREFIX)
AC_SUBST(OPAL_EXEC_PREFIX)
AC_SUBST(OPAL_BINDIR)
AC_SUBST(OPAL_SBINDIR)
AC_SUBST(OPAL_LIBEXECDIR)
AC_SUBST(OPAL_DATADIR)
AC_SUBST(OPAL_SYSCONFDIR)
AC_SUBST(OPAL_SHAREDSTATEDIR)
AC_SUBST(OPAL_LOCALSTATEDIR)
AC_SUBST(OPAL_LIBDIR)
AC_SUBST(OPAL_INCLUDEDIR)
AC_SUBST(OPAL_INFODIR)
AC_SUBST(OPAL_MANDIR)
exec_prefix="$ompi_exec_prefix_save"
AC_CONFIG_FILES([$1.tmp:$1.in])
AC_CONFIG_COMMANDS([install-dirs], [
if test -f "$1" ; then
diff "$1" "$1.tmp" > /dev/null 2>&1
if test "$?" != "0" ; then
cp "$1.tmp" "$1"
echo "config.status: regenerating $1"
else
echo "config.status: $1 unchanged"
fi
else
cp "$1.tmp" "$1"
echo "config.status: creating $1"
fi
rm "$1.tmp"])
])dnl

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

@ -888,21 +888,21 @@ AC_DEFUN([MCA_SETUP_DIRECT_CALL],[
MCA_WRITE_DIRECT_CALL_HEADER($1, $2)
])
AC_DEFUN([MCA_WRITE_DIRECT_CALL_HEADER],[
AC_CONFIG_FILES($2/mca/$1/$1_direct_call.h.template)
AC_CONFIG_FILES($2/mca/$1/$1_direct_call.h.tmp:$2/mca/$1/$1_direct_call.h.in)
AC_CONFIG_COMMANDS($1-direct,
[if test -f "$2/mca/$1/$1_direct_call"; then
diff "$2/mca/$1/$1_direct_call.h" "$2/mca/$1/$1_direct_call.h.template" > /dev/null 2>&1
diff "$2/mca/$1/$1_direct_call.h" "$2/mca/$1/$1_direct_call.h.tmp" > /dev/null 2>&1
if test "$?" != "0"; then
cp "$2/mca/$1/$1_direct_call.h.template" "$2/mca/$1/$1_direct_call.h"
cp "$2/mca/$1/$1_direct_call.h.tmp" "$2/mca/$1/$1_direct_call.h"
echo "config.status: regenerating $2/mca/$1/$1_direct_call.h"
else
echo "config.status: $2/mca/$1/$1_direct_call.h unchanged"
fi
else
cp "$2/mca/$1/$1_direct_call.h.template" "$2/mca/$1/$1_direct_call.h"
cp "$2/mca/$1/$1_direct_call.h.tmp" "$2/mca/$1/$1_direct_call.h"
echo "config.status: creating $2/mca/$1/$1_direct_call.h"
fi
rm $2/mca/$1/$1_direct_call.h.template])
rm $2/mca/$1/$1_direct_call.h.tmp])
])

68
config/ompi_save_version.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,68 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
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$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
# OMPI_SAVE_VERSION(project_short, project-long,
# version_file, header_file])
# ----------------------------------------------
# creates version information for project from version_file, using
# OMPI_GET_VERSION(). Information is AC_SUBSTed and put in
# header_file.
AC_DEFUN([OMPI_SAVE_VERSION], [
OMPI_GET_VERSION([$3], [$1])
AC_SUBST($1[_MAJOR_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[_VERSION])
AC_MSG_CHECKING([$2 version])
AC_MSG_RESULT([$]$1[_VERSION])
AC_MSG_CHECKING([$2 Subversion repository version])
AC_MSG_RESULT([$]$1[_SVN_R])
AC_DEFINE_UNQUOTED($1[_MAJOR_VERSION], [$]$1[_MAJOR_VERSION],
[Major release number of ]$2)
AC_DEFINE_UNQUOTED($1[_MINOR_VERSION], [$]$1[_MINOR_VERSION],
[Minor release number of ]$2)
AC_DEFINE_UNQUOTED($1[_RELEASE_VERSION], [$]$1[_RELEASE_VERSION],
[Release release number of ]$2)
AC_DEFINE_UNQUOTED($1[_GREEK_VERSION], ["$]$1[_GREEK_VERSION"],
[Greek - alpha, beta, etc - release number of ]$2)
AC_DEFINE_UNQUOTED($1[_VERSION], ["$]$1[_RELEASE_VERSION"],
[Complete release number of ]$2)
AC_CONFIG_FILES([$4.tmp:$4.in])
AC_CONFIG_COMMANDS([$1-versions], [
if test -f "$4" ; then
diff "$4" "$4.tmp" > /dev/null 2>&1
if test "$?" != "0" ; then
cp "$4.tmp" "$4"
echo "config.status: regenerating $4"
else
echo "config.status: $4 unchanged"
fi
else
cp "$4.tmp" "$4"
echo "config.status: creating $4"
fi
rm "$4.tmp"])
])dnl

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

@ -59,7 +59,14 @@ ompi_show_subtitle "Checking versions"
# Get the version of OMPI that we are installing
OMPI_GET_VERSION([$srcdir/VERSION], OMPI)
OMPI_SAVE_VERSION([OMPI], [Open MPI], [$srcdir/VERSION],
[ompi/include/ompi/version.h])
OMPI_SAVE_VERSION([ORTE], [Open Open Run-Time Environment], [$srcdir/VERSION],
[orte/include/orte/version.h])
OMPI_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
[opal/include/opal/version.h])
# override/fixup the version numbers set by AC_INIT, since on
# developer builds, there's no good way to know what the version is
@ -67,103 +74,15 @@ OMPI_GET_VERSION([$srcdir/VERSION], OMPI)
# (ie, no svn r numbers) for the version set in AC_INIT. This will
# always match reality because we add the VERSION file (the only way
# to change the major.minor.release{greek}) into the configure
# dependencies.
PACKAGE_VERSION="$OMPI_VERSION"
# dependencies. PACKAGE_VERSION the AC_DEFINE doesn't change once set
# the first time -- AC_INIT's input (so it doesn't have an r number in
# it). PACKAGE_VERSION the AC_SUBST can be rewritten along the way,
# and we'd like it to have the r number in it so that it shows up in
# the tarball name, so it is set to the full version here.
PACKAGE_VERSION="$OPAL_VERSION"
PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}"
VERSION="${PACKAGE_VERSION}"
AC_SUBST(OMPI_MAJOR_VERSION)
AC_SUBST(OMPI_MINOR_VERSION)
AC_SUBST(OMPI_RELEASE_VERSION)
AC_SUBST(OMPI_GREEK_VERSION)
AC_SUBST(OMPI_WANT_SVN)
AC_SUBST(OMPI_SVN_R)
AC_SUBST(OMPI_VERSION)
AC_DEFINE_UNQUOTED(OMPI_MAJOR_VERSION, $OMPI_MAJOR_VERSION,
[Major release number of Open MPI])
AC_DEFINE_UNQUOTED(OMPI_MINOR_VERSION, $OMPI_MINOR_VERSION,
[Minor release number of Open MPI])
AC_DEFINE_UNQUOTED(OMPI_RELEASE_VERSION, $OMPI_RELEASE_VERSION,
[Release release number of Open MPI])
AC_DEFINE_UNQUOTED(OMPI_GREEK_VERSION, "$OMPI_GREEK_VERSION",
[Greek - alpha, beta, etc - release number of Open MPI])
AC_DEFINE_UNQUOTED(OMPI_VERSION, "$OMPI_RELEASE_VERSION",
[Complete release number of Open MPI])
# JMS: For the moment, cheat and have ORTE and OPAL version numbers be
# the same. Someday, they will be 3rd part import packages and have
# their own version numbers
ORTE_MAJOR_VERSION="$OMPI_MAJOR_VERSION"
ORTE_MINOR_VERSION="$OMPI_MINOR_VERSION"
ORTE_RELEASE_VERSION="$OMPI_RELEASE_VERSION"
ORTE_GREEK_VERSION="$OMPI_GREEK_VERSION"
ORTE_WANT_SVN="$OMPI_WANT_SVN"
ORTE_SVN_R="$OMPI_SVN_R"
ORTE_VERSION="$OMPI_VERSION"
AC_SUBST(ORTE_MAJOR_VERSION)
AC_SUBST(ORTE_MINOR_VERSION)
AC_SUBST(ORTE_RELEASE_VERSION)
AC_SUBST(ORTE_GREEK_VERSION)
AC_SUBST(ORTE_WANT_SVN)
AC_SUBST(ORTE_SVN_R)
AC_SUBST(ORTE_VERSION)
AC_DEFINE_UNQUOTED(ORTE_MAJOR_VERSION, $ORTE_MAJOR_VERSION,
[Major release number of Open RTE])
AC_DEFINE_UNQUOTED(ORTE_MINOR_VERSION, $ORTE_MINOR_VERSION,
[Minro release number of Open RTE])
AC_DEFINE_UNQUOTED(ORTE_RELEASE_VERSION, $ORTE_RELEASE_VERSION,
[Release release number of Open RTE])
AC_DEFINE_UNQUOTED(ORTE_GREEK_VERSION, "$ORTE_GREEK_VERSION",
[Greek - alpha, beta, etc - release number of Open RTE])
AC_DEFINE_UNQUOTED(ORTE_VERSION, "$ORTE_RELEASE_VERSION",
[Complete release number of Open RTE])
OPAL_MAJOR_VERSION="$OMPI_MAJOR_VERSION"
OPAL_MINOR_VERSION="$OMPI_MINOR_VERSION"
OPAL_RELEASE_VERSION="$OMPI_RELEASE_VERSION"
OPAL_GREEK_VERSION="$OMPI_GREEK_VERSION"
OPAL_WANT_SVN="$OMPI_WANT_SVN"
OPAL_SVN_R="$OMPI_SVN_R"
OPAL_VERSION="$OMPI_VERSION"
AC_SUBST(OPAL_MAJOR_VERSION)
AC_SUBST(OPAL_MINOR_VERSION)
AC_SUBST(OPAL_RELEASE_VERSION)
AC_SUBST(OPAL_GREEK_VERSION)
AC_SUBST(OPAL_WANT_SVN)
AC_SUBST(OPAL_SVN_R)
AC_SUBST(OPAL_VERSION)
AC_DEFINE_UNQUOTED(OPAL_MAJOR_VERSION, $OPAL_MAJOR_VERSION,
[Major release number of OPAL])
AC_DEFINE_UNQUOTED(OPAL_MINOR_VERSION, $OPAL_MINOR_VERSION,
[Minor release number of OPAL])
AC_DEFINE_UNQUOTED(OPAL_RELEASE_VERSION, $OPAL_RELEASE_VERSION,
[Release release number of OPAL])
AC_DEFINE_UNQUOTED(OPAL_GREEK_VERSION, "$OPAL_GREEK_VERSION",
[Greek - alpha, beta, etc - release number of OPAL])
AC_DEFINE_UNQUOTED(OPAL_VERSION, "$OPAL_RELEASE_VERSION",
[Complete release number of OPAL])
AC_MSG_CHECKING([Open MPI version])
AC_MSG_RESULT([$OMPI_VERSION])
AC_MSG_CHECKING([Open MPI Subversion repository version])
AC_MSG_RESULT([$OMPI_SVN_R])
AC_MSG_CHECKING([Open Run-Time Environment (ORTE) version])
AC_MSG_RESULT([$ORTE_VERSION])
AC_MSG_CHECKING([ORTE Subversion repository version])
AC_MSG_RESULT([$ORTE_SVN_R])
AC_MSG_CHECKING([Open Portable Access Layer (OPAL) version])
AC_MSG_RESULT([$OPAL_VERSION])
AC_MSG_CHECKING([OPAL Subversion repository version])
AC_MSG_RESULT([$OPAL_SVN_R])
ompi_show_subtitle "Initialization, setup"
#
@ -1151,6 +1070,8 @@ OMPI_SETUP_WRAPPER_FINAL
ompi_show_subtitle "Final output"
OMPI_INSTALL_DIRS(opal/include/opal/install_dirs.h)
AM_CONFIG_HEADER([opal/include/opal_config.h orte/include/orte_config.h ompi/include/ompi_config.h ompi/include/mpi.h])
AC_CONFIG_FILES([
Makefile

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

@ -18,6 +18,8 @@
headers = ompi_config.h
nodist_headers =
# these two are always installed in $(includedir), but shouldn't be
# shipped since they are generated by configure from their .in
# counterparts, which AM automatically ships.
@ -27,7 +29,8 @@ nodist_include_HEADERS = \
if WANT_INSTALL_HEADERS
ompidir = $(includedir)/openmpi
nobase_ompi_HEADERS = $(headers)
nobase_dist_ompi_HEADERS = $(headers)
nobase_nodist_ompi_HEADERS = $(nodist_headers)
else
ompidir = $(includedir)
endif

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

@ -23,3 +23,6 @@ headers += \
ompi/constants.h \
ompi/types.h \
ompi/totalview.h
nodist_headers += \
ompi/version.h

38
ompi/include/ompi/version.h.in Обычный файл
Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs full
* version information for the OMPI project
*/
#ifndef OMPI_VERSIONS_H
#define OMPI_VERSIONS_H
#define OMPI_MAJOR_VERSION @OMPI_MAJOR_VERSION@
#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@"
#ifdef OMPI_VERSION
/* If we included version.h, we want the real version, not the
stripped (no-r number) verstion */
#undef OMPI_VERSION
#endif
#define OMPI_VERSION "@OMPI_VERSION@"
#endif

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

@ -17,12 +17,6 @@
#
AM_CPPFLAGS = \
-DOMPI_PREFIX="\"$(prefix)\"" \
-DOMPI_BINDIR="\"$(bindir)\"" \
-DOMPI_LIBDIR="\"$(libdir)\"" \
-DOMPI_INCDIR="\"$(includedir)\"" \
-DOMPI_PKGLIBDIR="\"$(pkglibdir)\"" \
-DOMPI_SYSCONFDIR="\"$(sysconfdir)\"" \
-DOMPI_CONFIGURE_USER="\"@OMPI_CONFIGURE_USER@\"" \
-DOMPI_CONFIGURE_HOST="\"@OMPI_CONFIGURE_HOST@\"" \
-DOMPI_CONFIGURE_DATE="\"@OMPI_CONFIGURE_DATE@\"" \
@ -40,13 +34,7 @@ AM_CPPFLAGS = \
-DOMPI_CC_ABSOLUTE="\"@OMPI_CC_ABSOLUTE@\"" \
-DOMPI_CXX_ABSOLUTE="\"@OMPI_CXX_ABSOLUTE@\"" \
-DOMPI_F77_ABSOLUTE="\"@OMPI_F77_ABSOLUTE@\"" \
-DOMPI_F90_ABSOLUTE="\"@OMPI_F90_ABSOLUTE@\"" \
-DOMPI_WANT_SVN=\"@OMPI_WANT_SVN@\" \
-DOMPI_SVN_R=\"@OMPI_SVN_R@\" \
-DORTE_WANT_SVN=\"@ORTE_WANT_SVN@\" \
-DORTE_SVN_R=\"@ORTE_SVN_R@\" \
-DOPAL_WANT_SVN=\"@OPAL_WANT_SVN@\" \
-DOPAL_SVN_R=\"@OPAL_SVN_R@\"
-DOMPI_F90_ABSOLUTE="\"@OMPI_F90_ABSOLUTE@\""
dist_pkgdata_DATA = help-ompi_info.txt

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

@ -36,6 +36,7 @@
#endif
#include <errno.h>
#include "opal/install_dirs.h"
#include "opal/class/opal_object.h"
#include "orte/runtime/runtime.h"
#include "opal/util/output.h"
@ -232,7 +233,7 @@ int main(int argc, char *argv[])
if (!acted) {
ompi_info::show_ompi_version(ver_full);
ompi_info::show_path(path_prefix, OMPI_PREFIX);
ompi_info::show_path(path_prefix, OPAL_PREFIX);
ompi_info::do_arch(cmd_line);
ompi_info::do_config(false);
ompi_info::open_components();

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

@ -32,6 +32,7 @@
#include <netdb.h>
#endif
#include "opal/install_dirs.h"
#include "opal/class/opal_value_array.h"
#include "opal/util/printf.h"
#include "opal/util/show_help.h"
@ -253,29 +254,29 @@ void ompi_info::do_path(bool want_all, opal_cmd_line_t *cmd_line)
string scope;
if (want_all) {
show_path(path_prefix, OMPI_PREFIX);
show_path(path_bindir, OMPI_BINDIR);
show_path(path_libdir, OMPI_LIBDIR);
show_path(path_incdir, OMPI_INCDIR);
show_path(path_pkglibdir, OMPI_PKGLIBDIR);
show_path(path_sysconfdir, OMPI_SYSCONFDIR);
show_path(path_prefix, OPAL_PREFIX);
show_path(path_bindir, OPAL_BINDIR);
show_path(path_libdir, OPAL_LIBDIR);
show_path(path_incdir, OPAL_INCLUDEDIR);
show_path(path_pkglibdir, OPAL_PKGLIBDIR);
show_path(path_sysconfdir, OPAL_SYSCONFDIR);
} else {
count = opal_cmd_line_get_ninsts(cmd_line, "path");
for (i = 0; i < count; ++i) {
scope = opal_cmd_line_get_param(cmd_line, "path", i, 0);
if (path_prefix == scope)
show_path(path_prefix, OMPI_PREFIX);
show_path(path_prefix, OPAL_PREFIX);
else if (path_bindir == scope)
show_path(path_bindir, OMPI_BINDIR);
show_path(path_bindir, OPAL_BINDIR);
else if (path_libdir == scope)
show_path(path_libdir, OMPI_LIBDIR);
show_path(path_libdir, OPAL_LIBDIR);
else if (path_incdir == scope)
show_path(path_incdir, OMPI_INCDIR);
show_path(path_incdir, OPAL_INCLUDEDIR);
else if (path_pkglibdir == scope)
show_path(path_pkglibdir, OMPI_PKGLIBDIR);
show_path(path_pkglibdir, OPAL_PKGLIBDIR);
else if (path_sysconfdir == scope)
show_path(path_sysconfdir, OMPI_SYSCONFDIR);
show_path(path_sysconfdir, OPAL_SYSCONFDIR);
else {
char *usage = opal_cmd_line_get_usage_msg(cmd_line);
opal_show_help("help-ompi_info.txt", "usage", true, usage);

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

@ -23,6 +23,9 @@
#include <stdio.h>
#include "opal/version.h"
#include "orte/version.h"
#include "ompi/version.h"
#include "opal/mca/base/base.h"
#include "ompi/tools/ompi_info/ompi_info.h"
#include "opal/util/printf.h"

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

@ -25,6 +25,7 @@ nodist_noinst_HEADERS = \
opal_config.h
headers =
nodist_headers =
if WANT_INSTALL_HEADERS
opaldir = $(includedir)/openmpi
@ -32,7 +33,9 @@ opaldir = $(includedir)/openmpi
nobase_dist_opal_HEADERS = \
$(headers) \
$(dist_noinst_HEADERS)
nobase_nodist_opal_HEADERS = $(nodist_noinst_HEADERS)
nobase_nodist_opal_HEADERS = \
$(nodist_headers) \
$(nodist_noinst_HEADERS)
else
opaldir = $(includedir)
endif

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

@ -22,4 +22,8 @@ headers += \
opal/constants.h \
opal/types.h
nodist_headers += \
opal/install_dirs.h \
opal/version.h
include opal/sys/Makefile.am

115
opal/include/opal/install_dirs.h.in Обычный файл
Просмотреть файл

@ -0,0 +1,115 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs the
* installation directories hard-coded into the object file. This
* should be avoided if at all possible, but there are some places
* (like the wrapper compilers) where it is infinitely easier to have
* the paths stored.
*
* If you have questions about which directory to use, we try as best
* we can to follow the GNU coding standards on this issue. The
* description of each directory can be found at the following URL:
*
* http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
*/
#ifndef OPAL_INST_DIRS_H
#define OPAL_INST_DIRS_H
#define OPAL_PREFIX "@OPAL_PREFIX@"
#define OPAL_EXEC_PREFIX "@OPAL_EXEC_PREFIX@"
/* The directory for installing executable programs that users can
run. */
#define OPAL_BINDIR "@OPAL_BINDIR@"
/* The directory for installing executable programs that can be run
from the shell, but are only generally useful to system
administrators. */
#define OPAL_SBINDIR "@OPAL_SBINDIR@"
/* The directory for installing executable programs to be run by other
programs rather than by users.
The definition of libexecdir is the same for all packages, so
you should install your data in a subdirectory thereof. Most
packages install their data under $(libexecdir)/package-name/,
possibly within additional subdirectories thereof, such as
$(libexecdir)/package-name/machine/version. */
#define OPAL_LIBEXECDIR "@OPAL_LIBEXECDIR@"
/* The directory for installing idiosyncratic read-only
architecture-independent data files for this program.
The definition of datadir is the same for all packages, so you
should install your data in a subdirectory thereof. Most packages
install their data under $(datadir)/package-name/. */
#define OPAL_DATADIR "@OPAL_DATADIR@"
/* $(datadir)/package-name/. You probably want to use this instead of
OPAL_DATADIR */
#define OPAL_PKGDATADIR "@OPAL_DATADIR@/@PACKAGE@"
/* The directory for installing read-only data files that pertain to a
single machinethat is to say, files for configuring a host. Mailer
and network configuration files, /etc/passwd, and so forth belong
here. All the files in this directory should be ordinary ASCII text
files.
Do not install executables here in this directory (they probably
belong in $(libexecdir) or $(sbindir)). Also do not install files
that are modified in the normal course of their use (programs whose
purpose is to change the configuration of the system
excluded). Those probably belong in $(localstatedir). */
#define OPAL_SYSCONFDIR "@OPAL_SYSCONFDIR@"
/* The directory for installing architecture-independent data files
which the programs modify while they run. */
#define OPAL_SHAREDSTATEDIR "@OPAL_SHAREDSTATEDIR@"
/* The directory for installing data files which the programs modify
while they run, and that pertain to one specific machine. Users
should never need to modify files in this directory to configure
the package's operation; put such configuration information in
separate files that go in $(datadir) or
$(sysconfdir). */
#define OPAL_LOCALSTATEDIR "@OPAL_LOCALSTATEDIR@"
/* The directory for object files and libraries of object code. Do not
install executables here, they probably ought to go in
$(libexecdir) instead. */
#define OPAL_LIBDIR "@OPAL_LIBDIR@"
/* $(libdir)/package-name/. This is where components should go */
#define OPAL_PKGLIBDIR "@OPAL_LIBDIR@/@PACKAGE@"
/* The directory for installing header files to be included by user
programs with the C #include preprocessor directive. */
#define OPAL_INCLUDEDIR "@OPAL_INCLUDEDIR@"
/* $(includedir)/package-name/. The devel headers go in here */
#define OPAL_PKGINCLUDEDIR "@OPAL_INCLUDEDIR@/@PACKAGE@"
/* The directory for installing the Info files for this package. */
#define OPAL_INFODIR "@OPAL_INFODIR@"
/* The top-level directory for installing the man pages (if any) for
this package. */
#define OPAL_MANDIR "@OPAL_MANDIR@"
#endif

38
opal/include/opal/version.h.in Обычный файл
Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs full
* version information for the OPAL project
*/
#ifndef OPAL_VERSIONS_H
#define OPAL_VERSIONS_H
#define OPAL_MAJOR_VERSION @OPAL_MAJOR_VERSION@
#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@"
#ifdef OPAL_VERSION
/* If we included version.h, we want the real version, not the
stripped (no-r number) verstion */
#undef OPAL_VERSION
#endif
#define OPAL_VERSION "@OPAL_VERSION@"
#endif

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

@ -20,9 +20,7 @@
# (by default)
AM_CPPFLAGS = \
$(OPAL_LTDL_CPPFLAGS) \
-DOMPI_PKGLIBDIR=\"$(pkglibdir)\" \
-DOMPI_SYSCONFDIR=\"$(sysconfdir)\"
$(OPAL_LTDL_CPPFLAGS)
noinst_LTLIBRARIES = libmca_base.la

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

@ -27,6 +27,7 @@
#include <unistd.h>
#endif
#include "opal/install_dirs.h"
#include "opal/util/output.h"
#include "opal/util/printf.h"
#include "opal/mca/mca.h"
@ -65,7 +66,7 @@ int mca_base_open(void)
/* Register some params */
asprintf(&value, "%s:~/.openmpi/components", OMPI_PKGLIBDIR);
asprintf(&value, "%s:~/.openmpi/components", OPAL_PKGLIBDIR);
mca_base_param_component_path =
mca_base_param_reg_string_name("mca", "component_path",
"Path where to look for Open MPI and ORTE components",

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

@ -22,6 +22,7 @@
#include <string.h>
#include <stdlib.h>
#include "opal/install_dirs.h"
#include "opal/class/opal_value_array.h"
#include "opal/util/show_help.h"
#include "opal/class/opal_hash_table.h"
@ -140,7 +141,7 @@ int mca_base_param_init(void)
asprintf(&files,
"~/.openmpi/mca-params.conf:%s/openmpi-mca-params.conf",
OMPI_SYSCONFDIR);
OPAL_SYSCONFDIR);
id = mca_base_param_reg_string_name("mca", "param_files",
"Path for MCA configuration files containing default parameter values",
false, false, files, &new_files);

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

@ -23,11 +23,6 @@ nodist_pkgdata_DATA = \
dist_pkgdata_DATA = \
help-opal-wrapper.txt
AM_CPPFLAGS = \
-DOPAL_LIBDIR="\"$(libdir)\"" \
-DOPAL_INCDIR="\"$(includedir)\"" \
-DOPAL_PKGDATADIR="\"$(pkgdatadir)\""
bin_PROGRAMS = opal_wrapper
opal_wrapper_SOURCES = \

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

@ -39,6 +39,7 @@
#include <string.h>
#endif /* HAVE_STRING_H */
#include "opal/install_dirs.h"
#include "opal/runtime/opal.h"
#include "opal/constants.h"
#include "opal/util/argv.h"
@ -93,7 +94,7 @@ data_callback(const char *key, const char *value)
for (i = 0 ; i < opal_argv_count(values) ; ++i) {
char *line;
asprintf(&line, "-I%s%s%s", OPAL_INCDIR, OMPI_PATH_SEP, values[i]);
asprintf(&line, "-I%s%s%s", OPAL_INCLUDEDIR, OMPI_PATH_SEP, values[i]);
opal_argv_append_nosize(&data.preproc_flags, line);
free(line);
}
@ -157,9 +158,9 @@ data_init(const char *appname)
data.req_file = NULL;
/* load the default -I<incdir> and -L<libdir> */
if (0 != strcmp(OPAL_INCDIR, "/usr/include")) {
if (0 != strcmp(OPAL_INCLUDEDIR, "/usr/include")) {
char *line;
asprintf(&line, "-I%s", OPAL_INCDIR);
asprintf(&line, "-I%s", OPAL_INCLUDEDIR);
opal_argv_append_nosize(&data.preproc_flags, line);
free(line);
}

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

@ -18,7 +18,6 @@
SUBDIRS = keyval
AM_CPPFLAGS = -DOMPI_PKGDATADIR=\"$(pkgdatadir)\"
AM_LFLAGS = -Popal_show_help_yy
LEX_OUTPUT_ROOT = lex.opal_show_help_yy

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

@ -22,6 +22,7 @@
#include <string.h>
#include <locale.h>
#include "opal/install_dirs.h"
#include "opal/util/show_help.h"
#include "opal/util/show_help_lex.h"
#include "opal/util/printf.h"
@ -102,11 +103,11 @@ static int open_file(const char *base, const char *topic)
/* Try to open the file. If we can't find it, try it with a .txt
extension. */
asprintf(&filename, "%s/%s", OMPI_PKGDATADIR, base);
asprintf(&filename, "%s/%s", OPAL_PKGDATADIR, base);
opal_show_help_yyin = fopen(filename, "r");
free(filename);
if (NULL == opal_show_help_yyin) {
asprintf(&filename, "%s/%s.txt", OMPI_PKGDATADIR, base);
asprintf(&filename, "%s/%s.txt", OPAL_PKGDATADIR, base);
opal_show_help_yyin = fopen(filename, "r");
free(filename);
}
@ -121,11 +122,11 @@ static int open_file(const char *base, const char *topic)
/* Do we have a file matching that locale? If not, open the
default language (because we know that we have that one) */
asprintf(&filename, "%s/%s.%s", OMPI_PKGDATADIR, base, lang);
asprintf(&filename, "%s/%s.%s", OPAL_PKGDATADIR, base, lang);
opal_show_help_yyin = fopen(filename, "r");
free(filename);
if (NULL == opal_show_help_yyin) {
asprintf(&filename, "%s/%s.%s", OMPI_PKGDATADIR,
asprintf(&filename, "%s/%s.%s", OPAL_PKGDATADIR,
base, default_language);
opal_show_help_yyin = fopen(filename, "r");
free(filename);
@ -134,7 +135,7 @@ static int open_file(const char *base, const char *topic)
/* If we still couldn't find it, try with no extension */
if (NULL == opal_show_help_yyin) {
asprintf(&filename, "%s/%s", OMPI_PKGDATADIR, base);
asprintf(&filename, "%s/%s", OPAL_PKGDATADIR, base);
opal_show_help_yyin = fopen(filename, "r");
free(filename);
}

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

@ -16,8 +16,6 @@
# $HEADER$
#
AM_CPPFLAGS = -DOMPI_PKGDATADIR=\"$(pkgdatadir)\"
SUBDIRS = \
include \
$(MCA_orte_FRAMEWORKS_SUBDIRS) \

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

@ -19,9 +19,12 @@
headers = orte_config.h
nodist_headers =
if WANT_INSTALL_HEADERS
ortedir = $(includedir)/openmpi
nobase_orte_HEADERS = $(headers)
nobase_dist_orte_HEADERS = $(headers)
nobase_nodist_orte_HEADERS = $(nodist_headers)
else
ortedir = $(includedir)
endif

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

@ -23,3 +23,6 @@ headers += \
orte/orte_constants.h \
orte/orte_types.h \
orte/orte_socket_errno.h
nodist_headers += \
orte/version.h

38
orte/include/orte/version.h.in Обычный файл
Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file should be included by any file that needs full
* version information for the ORTE project
*/
#ifndef ORTE_VERSIONS_H
#define ORTE_VERSIONS_H
#define ORTE_MAJOR_VERSION @ORTE_MAJOR_VERSION@
#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@"
#ifdef ORTE_VERSION
/* If we included version.h, we want the real version, not the
stripped (no-r number) verstion */
#undef ORTE_VERSION
#endif
#define ORTE_VERSION "@ORTE_VERSION@"
#endif

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

@ -18,8 +18,6 @@
dist_pkgdata_DATA = help-pls-bproc.txt
AM_CPPFLAGS = -I$(top_ompi_builddir)/src/include $(pls_bproc_CPPFLAGS) -DORTE_BINDIR="\"$(bindir)\""
# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).

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

@ -41,6 +41,7 @@
#include <string.h>
#endif /* HAVE_STRING_H */
#include "opal/opal/install_dirs.h"
#include "opal/event/event.h"
#include "opal/mca/base/mca_base_param.h"
#include "opal/util/argv.h"
@ -558,7 +559,7 @@ static int orte_pls_bproc_launch_daemons(orte_cellid_t cellid, char *** envp,
} else {
orted_path = opal_path_findv(mca_pls_bproc_component.orted, 0, environ, NULL);
if(NULL == orted_path) {
asprintf(&orted_path, "%s/%s", ORTE_BINDIR,
asprintf(&orted_path, "%s/%s", OPAL_BINDIR,
mca_pls_bproc_component.orted);
if (0 != stat(orted_path, &buf)) {
char *path = getenv("PATH");
@ -567,7 +568,7 @@ static int orte_pls_bproc_launch_daemons(orte_cellid_t cellid, char *** envp,
}
opal_show_help("help-pls-bproc.txt", "no-orted", true,
mca_pls_bproc_component.orted,
mca_pls_bproc_component.orted, path, ORTE_BINDIR);
mca_pls_bproc_component.orted, path, OPAL_BINDIR);
rc = ORTE_ERROR;
ORTE_ERROR_LOG(rc);
goto cleanup;

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

@ -18,8 +18,6 @@
dist_pkgdata_DATA = help-pls-rsh.txt
AM_CPPFLAGS = -DOMPI_BINDIR="\"$(bindir)\""
sources = \
pls_rsh.h \
pls_rsh_component.c \

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

@ -54,6 +54,7 @@
#include <pwd.h>
#endif
#include "opal/install_dirs.h"
#include "opal/mca/base/mca_base_param.h"
#include "opal/util/if.h"
#include "opal/util/if.h"
@ -255,14 +256,14 @@ static int orte_pls_rsh_fill_exec_path ( char ** exec_path)
{
struct stat buf;
asprintf(exec_path, "%s/orted", OMPI_BINDIR);
asprintf(exec_path, "%s/orted", OPAL_BINDIR);
if (0 != stat(*exec_path, &buf)) {
char *path = getenv("PATH");
if (NULL == path) {
path = ("PATH is empty!");
}
opal_show_help("help-pls-rsh.txt", "no-local-orted",
true, path, OMPI_BINDIR);
true, path, OPAL_BINDIR);
return ORTE_ERR_NOT_FOUND;
}
return ORTE_SUCCESS;

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

@ -32,7 +32,6 @@ component_noinst = libmca_rds_hostfile.la
component_install =
endif
AM_CPPFLAGS = -I$(top_builddir)/src -DORTE_SYSCONFDIR="\"$(sysconfdir)\""
AM_LFLAGS = -Porte_rds_hostfile_
LEX_OUTPUT_ROOT = lex.orte_rds_hostfile_

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

@ -17,6 +17,8 @@
*/
#include "orte_config.h"
#include "opal/install_dirs.h"
#include "orte/orte_constants.h"
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
@ -69,7 +71,7 @@ orte_rds_hostfile_component_t mca_rds_hostfile_component = {
*/
static int orte_rds_hostfile_open(void)
{
char *path = opal_os_path(false, ORTE_SYSCONFDIR, "openmpi-default-hostfile", NULL);
char *path = opal_os_path(false, OPAL_SYSCONFDIR, "openmpi-default-hostfile", NULL);
OBJ_CONSTRUCT(&mca_rds_hostfile_component.lock, opal_mutex_t);
mca_base_param_reg_int(&mca_rds_hostfile_component.super.rds_version, "debug",