#!/bin/sh

SYSTEMS="Gambit-C Bigloo Chicken MzScheme Scheme48"
BENCHMARKS="all"
#SETTINGS="r5rs r6rs r6rs-fixflo r6rs-fixflo-unsafe"
SETTINGS="r6rs"

# mostly-fixflo mostly-flofix mostly-fix mostly-flo mostly-generic sb-mostly-fixflo sb-mostly-flofix sb-mostly-fix sb-mostly-flo sb-mostly-generic 

for setting in $SETTINGS ; do

  rm -f all-results.scm

  echo "(define all-results '(" > all-results.scm

  for SYSTEM in $SYSTEMS; do
      for result in results.${SYSTEM}-$setting ; do
          
          #SYSTEM=`echo $result | sed s/results.//`
          
          echo ";---------------------------------------------------" >> all-results.scm
          echo "($SYSTEM" >> all-results.scm
          ./summarize $result >> all-results.scm
          echo ")" >> all-results.scm
          
      done
  done

  echo "))" >> all-results.scm

  gsi generate-html-from-all-results.scm

  mv bench.html bench-$setting.html

done
