author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 01:19:32 +0300 | |
changeset 37 | 758a864f9613 |
parent 33 | 3e2da88830cd |
permissions | -rw-r--r-- |
0 | 1 |
#!/bin/sh |
2 |
||
3 |
QMKSPEC=$1 |
|
4 |
VERBOSE=$2 |
|
5 |
SRCDIR=$3 |
|
6 |
OUTDIR=$4 |
|
7 |
||
8 |
# debuggery |
|
9 |
[ "$VERBOSE" = "yes" ] && echo "Testing size of pointers ... ($*)" |
|
10 |
||
11 |
# build and run a test program |
|
12 |
test -d "$OUTDIR/config.tests/unix/ptrsize" || mkdir -p "$OUTDIR/config.tests/unix/ptrsize" |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
13 |
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/ptrsize/ptrsizetest.pro" -o "$OUTDIR/config.tests/unix/ptrsize/Makefile" >/dev/null 2>&1 |
0 | 14 |
cd "$OUTDIR/config.tests/unix/ptrsize" |
15 |
||
16 |
if [ "$VERBOSE" = "yes" ]; then |
|
17 |
($MAKE clean && $MAKE) |
|
18 |
else |
|
19 |
($MAKE clean && $MAKE) >/dev/null 2>&1 |
|
20 |
fi |
|
21 |
RETVAL=$? |
|
22 |
||
23 |
if [ "$RETVAL" -ne 0 ]; then |
|
24 |
PTRSIZE=4 |
|
25 |
else |
|
26 |
PTRSIZE=8 |
|
27 |
fi |
|
28 |
||
29 |
||
30 |
# done |
|
31 |
[ "$VERBOSE" = "yes" ] && echo "Pointer size: $PTRSIZE" |
|
32 |
exit $PTRSIZE |