+++ /dev/null
-#! /bin/bash
-
-MACHINES=${MACHINES:-\
- graal.ens-lyon.fr \
- sperm.cs.ucsb.edu basalt.cs.ucsb.edu valnure.cs.ucsb.edu \
- AIX}
-
-# no access anymore: nala.cs.utk.edu allo-psmn.ens-lyon.fr
-
-# ACTIONS: What to do there
-# possible values:
-# - scp: copy a tarball over
-# - rsync: rsync the source (rsync must be installed remotely)
-#
-# - clean: erase any previously existing source tree and
-# open the new open
-# - untar: open the tarball which was just copied
-# - touch: touch every file of the source tree to deal with
-# clock brokenness. May help, may harm.
-# - config: launch configure
-# - compile: run 'make'
-# - install: run 'make install'
-# - check: run 'make check'
-#
-# default value:
-ACTIONS=${ACTIONS:-scp clean untar config compile check}
-
-REMOTE_PREFIX=${REMOTE_PREFIX:-simgrid}
-
-###
-### End of configuration. You shouldn't change anything below
-###
-
-srcdir=`echo "@srcdir@"|./config.status --file=-:-`
-PACKAGE=`echo "@PACKAGE@"|./config.status --file=-:-`
-VERSION=`echo "@VERSION@"|./config.status --file=-:-`
-
-echo;echo "----[ Recompile the package on remote hosts ]----"
-test -e $srcdir/buildlogs/${PACKAGE}-${VERSION} || mkdir -p ${srcdir}/buildlogs/${PACKAGE}-${VERSION}
-failed=0;
- for site in ${MACHINES} ; do
- machine=`echo $site |sed 's/^\([^%]*\)%.*$/\1/'`;
- machine2=`echo $site |sed 's/^\([^%]*\)%\(.*\)$/\2/'`;
- cmd="\"sh -c 'env REMOTE_PREFIX=${REMOTE_PREFIX} ${REMOTE_PREFIX}/src/graspe-slave ${ACTIONS} 2>&1'\"";
- if echo $site | grep '%' >/dev/null ; then
- echo "----[ Compile on $machine2 (behind $machine) ]----";
- else
- machine=$site;
- echo "----[ Compile on $machine ]----";
- fi;
-
- ##
- ## Source diffusion
- ##
-
- if echo ${ACTIONS} | grep -q scp ; then
- echo "-- Copy the data over";
- [ -e ${srcdir}/${PACKAGE}-${VERSION}.tar.gz ] || make -C ${srcdir} dist
- scp ${srcdir}/${PACKAGE}-${VERSION}.tar.gz tools/graspe-slave \
- $machine:${REMOTE_PREFIX}/src;
- else if echo ${ACTIONS} | grep -q rsync ; then
- echo "-- Rsync the data over";
- [ -e ${srcdir}/${PACKAGE}-${VERSION} ] || make -C ${srcdir} distdir
- rsync -t -r ${srcdir}/${PACKAGE}-${VERSION} tools/graspe-slave $machine:${REMOTE_PREFIX}/src/
- fi fi
-
- ##
- ## Compilation
- ##
-
- echo "-- Compiling... (the output gets into ${srcdir}/buildlogs/${PACKAGE}-${VERSION}/$site.log)";
- if echo $site | grep '%' >/dev/null ; then
- if ssh $machine "env REMOTE_PREFIX=${REMOTE_PREFIX} ssh -A $machine2 $cmd" 2>&1 > ${srcdir}/buildlogs/${PACKAGE}-${VERSION}/$site.log;
- then echo "Sucessful"; else failed=1;echo "Failed (check ${srcdir}/buildlogs/${PACKAGE}-${VERSION}/$site.log)"; fi;echo;
- else
- if ssh $machine "eval $cmd" 2>&1 > ${srcdir}/buildlogs/${PACKAGE}-${VERSION}/$site.log ;
- then echo "Sucessful"; else failed=1;echo "Failed (check ${srcdir}/buildlogs/${PACKAGE}-${VERSION}/$site.log)"; fi;echo;
- fi;
-done;
-${srcdir}/tools/compile-stats;
-exit $failed
+++ /dev/null
-#! /bin/sh
-# @WARNING@
-# It is used to compile on remote hosts
-
-###
-# Configuration
-###
-
-# Where to install the stuff into (REMOTE_PREFIX gets fixed by the makefile)
-PREFIX=$REMOTE_PREFIX
-if echo $PREFIX | egrep '^/' > /dev/null ; then
- echo "Prefix is an absolute path. Good, it makes configure happy"
-else
- echo "Change prefix to an absolute path to keep configure happy"
- PREFIX="$HOME/$PREFIX"
-fi
-echo "(PREFIX=$PREFIX)"
-
-# Where extra libraries are installed (if any)
-LD_LIBRARY_PATH="$PREFIX/lib"
-
-# Extra environment to pass to configure
-CONFIGURE_ENV=""
-
-# Argument of configure
-CONFIGURE_ARGS="--prefix=$PREFIX/@PACKAGE@"
-
-# make target
-MAKE_ALL="all"
-MAKE_INSTALL=install
-MAKE_CHECK="-k check"
-
-echo "Launching $0"
-
-###
-# Magic to search a working shell (from autobook)
-###
-# Zsh is not Bourne compatible without the following:
-if test -n "$ZSH_VERSION"; then
- emulate sh
- NULLCMD=:
-fi
-
-# Bash is not POSIX compliant without the following:
-test -n "$BASH_VERSION" && set -o posix
-
-SHELL="${SHELL-/bin/sh}"
-if test x"$1" = x--re-executed; then
- # Functional shell was found. Remove option and continue
- shift
-elif "$SHELL" -c 'foo () { exit 0; }; foo' 2>/dev/null &&
- "$SHELL" -c 'export toto=tutu' 2>/dev/null ; then
- # The current shell works already!
- echo "Current shell ($SHELL) working"
-else
- # Try alternative shells that (sometimes) support functions
- for cmd in bash sh ash bsh ksh zsh sh5
- do
- for dir in `echo $PATH | sed -e 's/:/ /g'` /bin /usr/bin
- do
- shell="$dir/$cmd"
- if (test -f "$shell" || test -f "$shell.exe") &&
- "$shell" -c 'foo () { exit 0; }; foo' 2>/dev/null &&
- "$shell" -c 'export toto=tutu' 2>/dev/null
- then
- # Re-execute with discovered functional shell
- echo "Reexecute $0 $@ with shell $shell"
- SHELL="$shell" exec "$shell" "$0" --re-executed ${1+"$@"}
- fi
- done
- done
- echo "Unable to locate a shell interpreter with function support and export syntax" >&2
- exit 1
-fi
-
-
-
-###
-# Real script
-###
-if [ "x$CC" = x ] ; then
- echo "CC not set. Search for xlC"
- xlC=`which xlC`
- if [ "x$xlC" != x ] ; then
- echo "Found (in $xlC)"
- CONFIGURE_ARGS="$CONFIGURE_ARGS CC=xlC"
- else
- echo "Not found. Stick to the defaults"
- fi
-fi
-
-# expend the path for solaris
-PATH="$PATH:/usr/xpg4/bin"
-export PATH
-
-fail () {
- echo $1;
- echo CONFIG-LOG-DUMP-BEGIN
- cat config.log
- echo CONFIG-LOG-DUMP-END
- exit 1;
-}
-
-printenv;
-echo PATH=$PATH
-
-cd $PREFIX/src || fail "Cannot cd to $PREFIX/src"
-
-do_cmd() {
- echo "Do $1"
- eval `echo $1` 2>&1 || fail "$2"
- echo "Done $1"
-}
-
-if echo $@ | grep clean >/dev/null ; then
- for name in @PACKAGE@* ; do
- if test "$name" != "@PACKAGE@-@VERSION@.tar.gz" ; then
- echo "XXX Remove $name";
- rm -rf $name;
- fi;
- done;
-
- echo "XXX Untar @PACKAGE@-@VERSION@"
- do_cmd "gunzip @PACKAGE@-@VERSION@.tar.gz" "Cannot gunzip"
- do_cmd "tar xf @PACKAGE@-@VERSION@.tar" "Cannot untar"
-fi
-
-if echo $@ | grep touch >/dev/null ; then
- echo "XXX Touch everything within the tarball"
- find @PACKAGE@-@VERSION@ -type f | while read f; do touch $f;done
- sleep 2
-fi
-cd @PACKAGE@-@VERSION@ || fail "Cannot cd to @PACKAGE@-@VERSION@"
-
-if echo $@ | grep config >/dev/null ; then
- do_cmd "env $CONFIGURE_ENV \
- ./configure $CONFIGURE_ARGS" "Cannot configure"
-fi
-
-if echo $@ | grep compile >/dev/null ; then
- do_cmd "make $MAKE_ALL" "Cannot make"
-fi
-
-if echo $@ | grep install >/dev/null ; then
- do_cmd "make $MAKE_INSTALL" "Cannot make install"
-fi
-
-if echo $@ | grep check >/dev/null ; then
- do_cmd "make $MAKE_CHECK 2>&1" || fail "Cannot make check"
-fi
-
-echo Remote compilation sucessful.
-echo
-echo
-echo CONFIG-LOG-DUMP-BEGIN
-cat config.log
-echo CONFIG-LOG-DUMP-END
-echo
-echo
-echo Remote compilation sucessful.
-exit 0