#!/bin/sh # # Easy way to compile qscheme from archives # if [ $# != 1 ] then echo "Usage: $0 version" echo "version should be the version number, for example 0.2.1" exit 1 fi VERSION=$1 LOG=`pwd`/compile-qscheme.log if [ -d qscheme-$VERSION ]; then rm -r qscheme-$VERSION ; fi echo "Extracting the tarballs..." tar xzf qscheme-$VERSION.tar.gz cd qscheme-$VERSION tar xzf ../ffcall* tar xzf ../gmp* tar xzf ../pcre* touch .depend echo "Now compiling qscheme. Note that all output is logged to $LOG" echo "Compiling PCRE..." (cd pcre*; make) >$LOG 2>&1 echo "Compiling QScheme (takes about 1 min on a K6/400)..." make >$LOG 2>&1 echo "Trying to compile sgtk. This may fail..." (cd sgtk && make) >$LOG 2>&1 echo "Running benchmarks..." echo echo "*** Tail recursive loop benchmark..." time ./qscheme loop.scm echo echo "*** While loop benchmark..." time ./qscheme wloop.scm echo echo "*** 3 times Fibonaci number benchmark..." time ./qscheme fib.scm echo echo "QScheme version $VERSION is now built." echo "Do not forget to set the QS_LIB env variable before you try it." echo "Just copy type in the following line:" echo echo " QS_LIB="`pwd`" ; export QS_LIB" echo echo "Now you can start QScheme. Have fun." echo