#!/bin/sh # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * This file is part of SableVM. * # * See the file "LICENSE" for Copyright information and the * # * terms and conditions for copying, distribution and * # * modification of SableVM. * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # This script builds all permutations of SableVM according to the # configure OPTIONS specified below. Perhaps it would be good # to enhance it so that you can specify exactly which configure OPTIONS should # be varied when generating the permutations -- it is for the moment # hard-coded. #===================================================================== # set version #===================================================================== VERSION=chris #===================================================================== # set location #===================================================================== if test x$1 == x ; then LOCATION=${HOME}/${HOSTTYPE} else LOCATION=$1 fi # This loop iterates through all the permutations of configure OPTIONS. # This is much easier to maintain, in the event that a new option gets # introduced, than a bunch of scripts. If you want to add, for example, # switch, direct, and inlined-threading modes, multiply the current loop # count by 3 (8 * 3 == 24), and then introduce tests for whether (i % 3) # equals 0, 1, or 2, and then divide by 3. i=0 while [ `expr $i '<' 16` -eq 1 ] do j=$i OPTIONS="--prefix=${LOCATION}" OPTIONS="${OPTIONS} --with-threading=switch" SUFFIX="-${VERSION}-switch" if [ `expr $j % 2` -eq 0 ] then OPTIONS="${OPTIONS} --enable-speculative-multithreading=no" else OPTIONS="${OPTIONS} --enable-speculative-multithreading=yes" SUFFIX="${SUFFIX}-spmt" fi j=`expr $j / 2` if [ `expr $j % 2` -eq 0 ] then OPTIONS="${OPTIONS} --enable-debugging-features=no" else OPTIONS="${OPTIONS} --enable-debugging-features=yes" SUFFIX="${SUFFIX}-debug" fi j=`expr $j / 2` if [ `expr $j % 2` -eq 0 ] then OPTIONS="${OPTIONS} --with-gc=copying" else OPTIONS="${OPTIONS} --with-gc=none" SUFFIX="${SUFFIX}-nogc" fi j=`expr $j / 2` if [ `expr $j % 2` -eq 0 ] then OPTIONS="${OPTIONS} --enable-statistics=no" else OPTIONS="${OPTIONS} --enable-statistics=yes" SUFFIX="${SUFFIX}-stats" fi OPTIONS="${OPTIONS} --program-suffix=${SUFFIX}" OPTIONS="${OPTIONS} --libdir=${LOCATION}/lib/sablevm${SUFFIX}" echo "CC= LDFLAGS=\"\$LDFLAGS -L\${HOME}/lib64\" CFLAGS=\"-I\${HOME}/include\" LD_LIBRARY_PATH=\"\${HOME}/lib64\"" \ "./configure ${OPTIONS}" '&&' \ "make" '&&' \ "make install" '&&' \ "ln -s ${LOCATION}/lib/sablevm-classpath ${LOCATION}/lib/sablevm${SUFFIX}/sablevm-classpath" echo i=`expr $i + 1` done