summaryrefslogtreecommitdiffstats
path: root/config.tests/mac/crc.test
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/mac/crc.test')
-rwxr-xr-xconfig.tests/mac/crc.test71
1 files changed, 71 insertions, 0 deletions
diff --git a/config.tests/mac/crc.test b/config.tests/mac/crc.test
new file mode 100755
index 0000000..1a16204
--- /dev/null
+++ b/config.tests/mac/crc.test
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+SUCCESS=no
+QMKSPEC=$1
+XPLATFORM=`basename "$1"`
+QMAKE_CONFIG=$2
+VERBOSE=$3
+SRCDIR=$4
+OUTDIR=$5
+TEST=$6
+EXE=`basename "$6"`
+ARG=$7
+shift 7
+LFLAGS=""
+INCLUDEPATH=""
+CXXFLAGS=""
+while [ "$#" -gt 0 ]; do
+ PARAM=$1
+ case $PARAM in
+ -framework)
+ LFLAGS="$LFLAGS -framework \"$2\""
+ shift
+ ;;
+ -F*|-m*|-x*)
+ LFLAGS="$LFLAGS $PARAM"
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -L*|-l*|-pthread)
+ LFLAGS="$LFLAGS $PARAM"
+ ;;
+ -I*)
+ INC=`echo $PARAM | sed -e 's/^-I//'`
+ INCLUDEPATH="$INCLUDEPATH $INC"
+ ;;
+ -f*|-D*)
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -Qoption)
+ # Two-argument form for the Sun Compiler
+ CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
+ shift
+ ;;
+ *) ;;
+ esac
+ shift
+done
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)"
+
+test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
+
+cd "$OUTDIR/$TEST"
+
+make distclean >/dev/null 2>&1
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+
+if [ "$VERBOSE" = "yes" ]; then
+ make
+else
+ make >/dev/null 2>&1
+fi
+
+
+if [ -x "$EXE" ]; then
+ foo=`$OUTDIR/$TEST/$EXE $ARG`
+ echo "$foo"
+else
+ echo "'CUTE'" #1129665605 # == 'CUTE'
+fi
+