#!/bin/sh

QMKSPEC=$1
VERBOSE=$2
SRCDIR=$3
OUTDIR=$4

# debuggery

if [ "$VERBOSE" = "yes" ]
then
    echo "Testing STL support... ($*)"
fi


# ?

test -d $OUTDIR/config.tests/unix || mkdir -p $OUTDIR/config.tests/unix
$OUTDIR/bin/qmake -nocache -spec "$QMKSPEC" $SRCDIR/config.tests/unix/stltest.pro -o $OUTDIR/config.tests/unix/Makefile >/dev/null 2>&1
cd $OUTDIR/config.tests/unix

if [ "$VERBOSE" = "yes" ]; then
  make || exit 0
  ./stltest
else
  make >/dev/null 2>&1 || exit 0
  ./stltest >/dev/null 2>/dev/null
fi


syntax highlighted by Code2HTML, v. 0.9.1