2008-10-28 20:22:29 +03:00
|
|
|
#! /bin/csh -f
|
|
|
|
#
|
|
|
|
# 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.
|
2014-10-02 14:09:13 +04:00
|
|
|
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2008-10-28 20:22:29 +03:00
|
|
|
# University of Stuttgart. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
# All rights reserved.
|
2015-02-09 19:31:50 +03:00
|
|
|
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
|
2015-01-15 12:57:05 +03:00
|
|
|
# Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
# and Technology (RIST). All rights reserved.
|
2008-10-28 20:22:29 +03:00
|
|
|
# $COPYRIGHT$
|
2014-10-02 14:09:13 +04:00
|
|
|
#
|
2008-10-28 20:22:29 +03:00
|
|
|
# Additional copyrights may follow
|
2014-10-02 14:09:13 +04:00
|
|
|
#
|
2008-10-28 20:22:29 +03:00
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
|
|
|
set srcdir="$1"
|
|
|
|
set builddir="`pwd`"
|
|
|
|
set distdir="$builddir/$2"
|
|
|
|
set OMPI_VERSION="$3"
|
2011-02-17 17:01:10 +03:00
|
|
|
set OMPI_REPO_REV="$4"
|
2008-10-28 20:22:29 +03:00
|
|
|
|
|
|
|
if ("$distdir" == "") then
|
|
|
|
echo "Must supply relative distdir as argv[2] -- aborting"
|
|
|
|
exit 1
|
|
|
|
elif ("$OMPI_VERSION" == "") then
|
|
|
|
echo "Must supply version as argv[1] -- aborting"
|
|
|
|
exit 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
# we can catch some hard (but possible) to do mistakes by looking at
|
2014-10-02 18:31:47 +04:00
|
|
|
# our repo's revision, but only if we are in the source tree.
|
2008-10-28 20:22:29 +03:00
|
|
|
# Otherwise, use what configure told us, at the cost of allowing one
|
|
|
|
# or two corner cases in (but otherwise VPATH builds won't work)
|
2011-02-17 17:01:10 +03:00
|
|
|
set repo_rev=$OMPI_REPO_REV
|
2014-10-02 18:31:47 +04:00
|
|
|
if (-d .git) then
|
|
|
|
set repo_rev="`config/opal_get_version.sh VERSION --repo-rev`"
|
2008-10-28 20:22:29 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
set start=`date`
|
|
|
|
cat <<EOF
|
2014-10-02 14:09:13 +04:00
|
|
|
|
2008-10-28 20:22:29 +03:00
|
|
|
Creating Open MPI distribution
|
|
|
|
In directory: `pwd`
|
|
|
|
Version: $OMPI_VERSION
|
|
|
|
Started: $start
|
2014-10-02 14:09:13 +04:00
|
|
|
|
2008-10-28 20:22:29 +03:00
|
|
|
EOF
|
|
|
|
|
|
|
|
umask 022
|
|
|
|
|
2010-10-29 17:37:19 +04:00
|
|
|
# Some shell startup files alias cp, mv, and rm to have "-i"
|
|
|
|
# (interactive). Unalias here, just so that we don't use that option.
|
|
|
|
unalias cp
|
|
|
|
unalias rm
|
|
|
|
unalias mv
|
|
|
|
|
2008-10-28 20:22:29 +03:00
|
|
|
if (! -d "$distdir") then
|
|
|
|
echo "*** ERROR: dist dir does not exist"
|
|
|
|
echo "*** ERROR: $distdir"
|
|
|
|
exit 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
2014-10-02 18:31:47 +04:00
|
|
|
# Update VERSION:repo_rev with the best value we have.
|
2008-10-28 20:22:29 +03:00
|
|
|
#
|
2014-10-02 18:31:47 +04:00
|
|
|
sed -e 's/^repo_rev=.*/repo_rev='$repo_rev'/' "${distdir}/VERSION" > "${distdir}/version.new"
|
|
|
|
cp -f "${distdir}/version.new" "${distdir}/VERSION"
|
|
|
|
rm -f "${distdir}/version.new"
|
|
|
|
# need to reset the timestamp to not annoy AM dependencies
|
|
|
|
touch -r "${srcdir}/VERSION" "${distdir}/VERSION"
|
|
|
|
echo "*** Updated VERSION file with repo rev number"
|
2008-10-28 20:22:29 +03:00
|
|
|
|
|
|
|
#########################################################
|
|
|
|
# VERY IMPORTANT: Now go into the new distribution tree #
|
|
|
|
#########################################################
|
|
|
|
cd "$distdir"
|
|
|
|
echo "*** Now in distdir: $distdir"
|
|
|
|
|
2010-09-18 03:04:06 +04:00
|
|
|
#
|
|
|
|
# Put the release version number in the README and INSTALL files
|
|
|
|
#
|
|
|
|
|
2008-10-28 20:22:29 +03:00
|
|
|
set files="README INSTALL"
|
|
|
|
echo "*** Updating version number in $files..."
|
|
|
|
foreach file ($files)
|
|
|
|
echo " - Setting $file"
|
|
|
|
if (-f $file) then
|
2014-10-02 14:09:13 +04:00
|
|
|
sed -e "s/OMPI_VERSION/$OMPI_VERSION/g" $file > bar
|
2008-10-28 20:22:29 +03:00
|
|
|
mv -f bar $file
|
|
|
|
endif
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# All done
|
|
|
|
#
|
|
|
|
|
|
|
|
cat <<EOF
|
2014-10-02 14:09:13 +04:00
|
|
|
*** Open MPI version $OMPI_VERSION distribution created
|
|
|
|
|
2008-10-28 20:22:29 +03:00
|
|
|
Started: $start
|
|
|
|
Ended: `date`
|
2014-10-02 14:09:13 +04:00
|
|
|
|
2008-10-28 20:22:29 +03:00
|
|
|
EOF
|
|
|
|
|