#!/bin/sh set -e srcdir=`dirname $0` if [ \ -r $srcdir/config.h.in \ -a -r $srcdir/Makefile.in \ -a -r $srcdir/aclocal.m4 \ -a -r $srcdir/configure \ -a "$1" != "y" \ ]; then echo 'The "Bootstrap" script need only be used on a' echo 'completely clean, fresh source tree. After the' echo 'first build, you should just use "make" or "gmake".' echo echo 'It looks as though you have already bootstrapped' echo 'this source tree. You should only bootstrap it' echo 'again if the makefiles or configuration files are' echo 'broken and "make" or "gmake" do not work properly.' echo echo 'Are you sure you want to re-bootstrap this tree?' echo case `echo -n` in '') n='-n' c='' ;; *) n='' c='\c' ;; esac echo $n "[y/n]: $c" read redo case $redo in y* ) ;; * ) exit 1; esac fi set -x ( cd $srcdir rm -Rf autom4te*.cache aclocal autoheader autoconf # Our configure script requires caching, and autoconf 2.5 stupidly disables # caching by default. Caching may open some dangers of stale values, but # the alternative is worse - automake reconfiguring in the absence of # precious environment variables leads to silent incorrect behavior that # can't be detected or fixed because there's no cache! # Restore ./config.cache as the default cache mv configure .configure-orig sed 's/^cache_file=\/dev\/null$/cache_file=.\/config.cache/' .configure-orig > configure chmod +x configure rm -f .configure-orig automake -a ( cd runtime/gasnet && ./Bootstrap y ) rm -Rf autom4te*.cache ) rm -f config.cache