2005-06-22 01:48:50 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2005-11-05 22:57:48 +03:00
|
|
|
# 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.
|
2005-06-22 01:48:50 +04:00
|
|
|
# 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$
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Version of auto tools that we want
|
|
|
|
#
|
|
|
|
|
2005-10-08 06:55:34 +04:00
|
|
|
AM_TARGET_VERSION=1.9.6
|
2005-06-22 01:48:50 +04:00
|
|
|
AC_TARGET_VERSION=2.59
|
2005-12-20 16:29:51 +03:00
|
|
|
LT_TARGET_VERSION=1.5.22
|
2005-06-22 01:48:50 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# First things first -- check that the auto versions that we have are
|
|
|
|
# the ones that we want.
|
|
|
|
#
|
|
|
|
|
|
|
|
check_gnu_version() {
|
|
|
|
prog="$1"
|
|
|
|
target="$2"
|
|
|
|
|
|
|
|
ver="`$prog --version | head -n 1 | cut -d\ -f 4`"
|
|
|
|
if test "$ver" != "$target"; then
|
|
|
|
cat <<EOF
|
|
|
|
ERROR: Program "$prog" does not have the correct/expected version:
|
|
|
|
Found: $ver
|
|
|
|
|
|
|
|
Expected versions:
|
|
|
|
Automake: $AM_TARGET_VERSION
|
|
|
|
Autoconf: $AC_TARGET_VERSION
|
|
|
|
Libtool: $LT_TARGET_VERSION
|
|
|
|
|
|
|
|
Either change this script to match the found version, or install
|
|
|
|
the correct version of the tools.
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2005-12-01 23:59:11 +03:00
|
|
|
#
|
|
|
|
# Subroutine to actually make a tarball
|
|
|
|
#
|
|
|
|
|
|
|
|
make_tarball() {
|
|
|
|
#
|
|
|
|
# Autogen
|
|
|
|
#
|
|
|
|
echo "*** Running autogen.sh..."
|
|
|
|
./autogen.sh 2>&1 | tee auto.out
|
|
|
|
if test ! "$?" = "0"; then
|
|
|
|
echo "Autogen failed. Aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Configure
|
|
|
|
#
|
|
|
|
echo "*** Running configure..."
|
|
|
|
./configure --enable-dist 2>&1 | tee config.out
|
|
|
|
if test ! "$?" = "0"; then
|
|
|
|
echo "Configure failed. Aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Sanity check
|
|
|
|
#
|
|
|
|
echo "*** Sanity check..."
|
|
|
|
file="ompi/mca/btl/gm/btl_gm_component.c"
|
|
|
|
if test ! -f "$file"; then
|
|
|
|
echo "Configure failed - no file: $file"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Remove autogen.sh (just to ensure users don't try to run it)
|
|
|
|
#
|
|
|
|
echo "*** Removing autogen.sh from the tarball before make dist"
|
|
|
|
rm -rf autogen.sh
|
|
|
|
|
|
|
|
#
|
|
|
|
# make tarball
|
|
|
|
#
|
|
|
|
echo "*** Running make distcheck..."
|
|
|
|
save_LD=$LD_LIBRARY_PATH
|
|
|
|
LD_LIBRARY_PATH=
|
2005-12-02 00:01:15 +03:00
|
|
|
make distcheck 2>&1 | tee dist.out
|
2005-12-01 23:59:11 +03:00
|
|
|
if test ! "$?" = "0"; then
|
|
|
|
echo "Make dist failed. Aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
LD_LIBRARY_PATH=$save_LD
|
|
|
|
|
|
|
|
#
|
|
|
|
# move
|
|
|
|
#
|
|
|
|
echo "*** Moving tarballs..."
|
|
|
|
mv openmpi-* ..
|
|
|
|
|
|
|
|
echo "*** All done"
|
|
|
|
|
|
|
|
#
|
|
|
|
# bring back autogen.sh
|
|
|
|
#
|
|
|
|
svn up autogen.sh
|
|
|
|
}
|
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
# main
|
|
|
|
#########################################################################
|
|
|
|
|
2005-06-22 01:48:50 +04:00
|
|
|
echo "*** Checking GNU tools versions..."
|
|
|
|
check_gnu_version automake $AM_TARGET_VERSION
|
|
|
|
check_gnu_version autoconf $AC_TARGET_VERSION
|
|
|
|
check_gnu_version libtool $LT_TARGET_VERSION
|
|
|
|
|
|
|
|
#
|
2005-12-02 00:01:15 +03:00
|
|
|
# Verify that we're in a top Open MPI dir
|
2005-06-22 01:48:50 +04:00
|
|
|
#
|
|
|
|
echo "*** Checking to ensure in top-level Open MPI directory..."
|
|
|
|
if test -f VERSION -a -f configure.ac -a -f config/ompi_setup_cc.m4; then
|
|
|
|
happy=1
|
|
|
|
else
|
|
|
|
echo "Do not appear to be in an Open MPI top directory. Abort!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Do svn up and all that
|
|
|
|
#
|
|
|
|
echo "*** Removing old VERSION files..."
|
|
|
|
find . -name VERSION -exec rm -f {} \; -print
|
|
|
|
|
|
|
|
echo "*** Running svn up..."
|
|
|
|
svn up
|
|
|
|
if test ! "$?" = "0"; then
|
|
|
|
echo "SVN update failed. Aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Ditch "svn" from all version numbers
|
|
|
|
#
|
|
|
|
echo "*** Removing svn version numbers..."
|
|
|
|
svn_r="r`svnversion .`"
|
|
|
|
version_files="`find . -name VERSION`"
|
|
|
|
for file in $version_files; do
|
|
|
|
echo " - $file"
|
|
|
|
sed -e 's/^want_svn=.*/want_svn=0/' \
|
|
|
|
-e 's/^svn_r=.*/'svn_r=$svn_r/ $file > $file.new
|
|
|
|
cp -f $file.new $file
|
|
|
|
rm $file.new
|
|
|
|
done
|
|
|
|
|
|
|
|
#
|
2005-12-01 23:59:11 +03:00
|
|
|
# Make 2 tarballs:
|
2005-06-22 01:48:50 +04:00
|
|
|
#
|
2005-12-01 23:59:11 +03:00
|
|
|
# - one with the greek
|
|
|
|
# - one without the greek
|
2005-06-22 01:48:50 +04:00
|
|
|
#
|
2005-12-01 23:59:11 +03:00
|
|
|
# unless the user specifically said --greekonly, then only make the
|
|
|
|
# greek tarball. Making both tarballs at once allows us to guarantee
|
2005-12-02 00:01:15 +03:00
|
|
|
# to have two tarballs -- one greek and one not -- that have exactly
|
|
|
|
# the same SVN r number (as opposed to, for example, running this
|
|
|
|
# script to make a greek tarball, then running it again to make a
|
|
|
|
# non-greek tarball -- there is a race condition that someone could
|
|
|
|
# commit in the meantime and change the SVN r number in the 2nd
|
|
|
|
# tarball)
|
2005-06-22 01:48:50 +04:00
|
|
|
#
|
|
|
|
|
2005-12-01 23:59:11 +03:00
|
|
|
# First, make greek tarball
|
2005-06-22 01:48:50 +04:00
|
|
|
|
2005-12-01 23:59:11 +03:00
|
|
|
echo "*** Making greek tarball"
|
|
|
|
make_tarball
|
2005-06-22 01:48:50 +04:00
|
|
|
|
2005-12-01 23:59:11 +03:00
|
|
|
# Now if ! --greekonly, make the non-greek tarball
|
2005-06-22 01:48:50 +04:00
|
|
|
|
2005-12-01 23:59:11 +03:00
|
|
|
if test "$1" != "-greekonly" -a "$1" != "--greekonly"; then
|
|
|
|
echo "*** REMOVING ALL GREEK FROM VERSION NUMBERS!!"
|
|
|
|
for file in $version_files; do
|
|
|
|
echo " - $file"
|
|
|
|
sed -e 's/^greek=.*/greek=/' $file > $file.new
|
|
|
|
cp -f $file.new $file
|
|
|
|
rm $file.new
|
|
|
|
done
|
|
|
|
echo "Making non-greek tarball"
|
|
|
|
make_tarball
|
2005-06-22 01:48:50 +04:00
|
|
|
fi
|
|
|
|
|