#!/bin/sh
##
##  feedback -- MM library feedback script
##  Copyright (c) 1999 Ralf S. Engelschall, All Rights Reserved. 
##

if [ ! -f .fbtool ]; then
    echo "fbtool:Error: still no results known";
    exit 1
fi
result=`cat .fbtool`

PLATFORM=`./config.guess`
PLATFORM=`./config.sub $PLATFORM`

VMPS=`grep MM_VMPS_ mm_conf.h | grep define | sed -e 's;.*MM_;MM_;' -e 's; .*;;'`; \
SHMT=`grep MM_SHMT_ mm_conf.h | grep define | sed -e 's;.*MM_;MM_;' -e 's; .*;;'`; \
SEMT=`grep MM_SEMT_ mm_conf.h | grep define | sed -e 's;.*MM_;MM_;' -e 's; .*;;'`; \

TMP=".fbsummary"
rm -f $TMP >/dev/null 2>&1
touch $TMP
echo "+-MM-Library-Test-Suite-Summary---------------------------" >>$TMP
echo "| Platform              : $PLATFORM" >>$TMP
echo "| Memory Page Size Type : $VMPS" >>$TMP
echo "| Shared Memory Type    : $SHMT" >>$TMP
echo "| Semaphore Type        : $SEMT" >>$TMP
echo "| Test Suite            : $result" >>$TMP
echo "+---------------------------------------------------------" >>$TMP

case $1 in
    -d ) cat $TMP ;;
    -s ) ;;
esac

rm -f $TMP >/dev/null 2>&1

