2001-08-29 14:35:15 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
IAM=`hostname || uname -n`
|
|
|
|
MYNAME=`IFS=. ; set $IAM ; echo $1`
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
'--one'|'-1')
|
|
|
|
shift
|
|
|
|
FB_FIRSTONLY=1
|
|
|
|
LIST=$MYNAME
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
FB_FIRSTONLY=0
|
|
|
|
esac
|
|
|
|
|
2001-08-29 14:35:15 +00:00
|
|
|
BUILD_ARGS="$@"
|
|
|
|
PARSE="--enable-parse-clocks"
|
|
|
|
#PARSE=
|
2008-08-18 14:26:05 +00:00
|
|
|
STD="--enable-simulator"
|
2001-08-29 14:35:15 +00:00
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
case "$SIMUL::$FB_FIRSTONLY" in
|
|
|
|
::*)
|
|
|
|
PARALLEL_BUILDS=1
|
|
|
|
;;
|
|
|
|
*::0)
|
|
|
|
PARALLEL_BUILDS=$SIMUL
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
PARALLEL_BUILDS=1
|
2009-12-12 22:29:30 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
case "$PARALLEL_BUILDS" in
|
|
|
|
1) ;;
|
|
|
|
*) echo Launching $PARALLEL_BUILDS parallel builds on each machine
|
|
|
|
esac
|
|
|
|
|
2004-07-20 15:01:56 +00:00
|
|
|
# Backroom:
|
2009-12-12 22:29:30 +00:00
|
|
|
# barnstable freebsd-6.1
|
|
|
|
# beauregard freebsd-6.0
|
|
|
|
# X churchy alpha-dec-osf5.1
|
2008-08-18 14:26:05 +00:00
|
|
|
# deacon sparc-sun-solaris2.10
|
2009-12-12 22:29:30 +00:00
|
|
|
# grundoon freebsd-6.2
|
2008-08-18 14:26:05 +00:00
|
|
|
# howland freebsd-6.1
|
2009-12-12 22:29:30 +00:00
|
|
|
# o macabre freebsd-6.1-STABLE
|
|
|
|
# o mort freebsd-6.1
|
2008-08-18 14:26:05 +00:00
|
|
|
# whimsy sparc-sun-solaris2.10
|
2004-07-20 15:01:56 +00:00
|
|
|
|
|
|
|
# Campus:
|
2008-08-18 14:26:05 +00:00
|
|
|
# * baldwin sparc-sun-solaris2.10
|
|
|
|
# * bridgeport sparc-sun-solaris2.10
|
|
|
|
# * malarky sparc-sun-solaris2.10
|
|
|
|
# * pogo sparc-sun-solaris2.10
|
|
|
|
# * rackety freebsd-6.1
|
2001-08-29 14:35:15 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
if [ ! -r sntp/libevent/build-aux/config.guess ] ; then
|
|
|
|
echo "Error: bootstrap required." 1>&2 && exit 1
|
|
|
|
fi
|
|
|
|
|
2009-12-12 22:29:30 +00:00
|
|
|
# HMS: we need $PWD because solaris produces /deacon/backroom when
|
|
|
|
# we are in /backroom and in general there is no /deacon/backroom.
|
2008-08-18 14:26:05 +00:00
|
|
|
c_d=${PWD:-`pwd`}
|
2001-08-29 14:35:15 +00:00
|
|
|
|
|
|
|
SIG=`perl -e 'print rand'`
|
|
|
|
|
|
|
|
case "$LIST" in
|
2014-12-20 22:52:39 +00:00
|
|
|
'') LIST="pogo" ;;
|
2001-08-29 14:35:15 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
for i in $LIST
|
|
|
|
do
|
2009-12-12 22:29:30 +00:00
|
|
|
SKIPTHIS=0
|
|
|
|
[ -f .buildkey-$i ] && SKIPTHIS=1
|
|
|
|
case "$SKIPTHIS" in
|
|
|
|
1)
|
2013-12-04 21:33:17 +00:00
|
|
|
echo flock-build running on $i? check LIST, skipping
|
|
|
|
;;
|
|
|
|
0)
|
|
|
|
echo $i
|
|
|
|
echo $SIG > .buildkey-$i
|
|
|
|
case "1" in
|
|
|
|
0)
|
|
|
|
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" &
|
2014-12-20 22:52:39 +00:00
|
|
|
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS" &
|
|
|
|
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS" &
|
|
|
|
ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS" &
|
2013-12-04 21:33:17 +00:00
|
|
|
;;
|
|
|
|
1)
|
|
|
|
cat > .flockbuild-$i-$SIG <<-ENDQUOT
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# script uses job control and expects to be invoked
|
|
|
|
# in a ssh session started with the -tt option,
|
|
|
|
# which forces a pseudo-tty to be used.
|
|
|
|
|
|
|
|
cd $c_d
|
|
|
|
COUNT=0
|
|
|
|
|
|
|
|
./build $SIG $PARSE $STD $BUILD_ARGS &
|
|
|
|
|
|
|
|
COUNT=\`expr \$COUNT + 1\`
|
|
|
|
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
|
|
|
|
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
|
|
|
|
|
|
|
|
case $FB_FIRSTONLY in
|
|
|
|
'0')
|
|
|
|
./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS &
|
|
|
|
|
|
|
|
COUNT=\`expr \$COUNT + 1\`
|
|
|
|
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
|
|
|
|
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
|
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS &
|
2013-12-04 21:33:17 +00:00
|
|
|
|
|
|
|
COUNT=\`expr \$COUNT + 1\`
|
|
|
|
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
|
|
|
|
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
|
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS &
|
2013-12-04 21:33:17 +00:00
|
|
|
|
|
|
|
COUNT=\`expr \$COUNT + 1\`
|
|
|
|
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
|
|
|
|
wait
|
|
|
|
esac
|
|
|
|
echo \`date -u '+%H:%M:%S'\` $i flock-build $c_d done.
|
|
|
|
rm .buildkey-$i
|
2009-12-12 22:29:30 +00:00
|
|
|
ENDQUOT
|
2013-12-04 21:33:17 +00:00
|
|
|
chmod +x .flockbuild-$i-$SIG
|
|
|
|
ssh -tt $i "$c_d/.flockbuild-$i-$SIG ; \
|
|
|
|
rm $c_d/.flockbuild-$i-$SIG" 2>/dev/null &
|
|
|
|
esac
|
2001-08-29 14:35:15 +00:00
|
|
|
esac
|
|
|
|
done
|
2009-12-12 22:29:30 +00:00
|
|
|
echo `date -u '+%H:%M:%S'` flock-build launched
|