qt5base-lts/config.tests/unix/ptrsize.test
Tor Arne Vestbø ba1aba61cc Disable app_bundle and lib_bundle when running configure tests
Just like configure.prf.

Change-Id: I760e0ca5bec41b3befb738a8a7a468e8f1a15946
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-16 13:44:18 +02:00

33 lines
765 B
Bash
Executable File

#!/bin/sh
QMKSPEC=$1
VERBOSE=$2
SRCDIR=$3
OUTDIR=$4
# debuggery
[ "$VERBOSE" = "yes" ] && echo "Testing size of pointers ... ($*)"
# build and run a test program
test -d "$OUTDIR/config.tests/unix/ptrsize" || mkdir -p "$OUTDIR/config.tests/unix/ptrsize"
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "CONFIG-=app_bundle" "$SRCDIR/config.tests/unix/ptrsize/ptrsizetest.pro" -o "$OUTDIR/config.tests/unix/ptrsize/Makefile" >/dev/null 2>&1
cd "$OUTDIR/config.tests/unix/ptrsize"
if [ "$VERBOSE" = "yes" ]; then
($MAKE clean && $MAKE)
else
($MAKE clean && $MAKE) >/dev/null 2>&1
fi
RETVAL=$?
if [ "$RETVAL" -ne 0 ]; then
PTRSIZE=4
else
PTRSIZE=8
fi
# done
[ "$VERBOSE" = "yes" ] && echo "Pointer size: $PTRSIZE"
exit $PTRSIZE