source: trunk/config.tests/unix/ptrsize.test

Last change on this file was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

  • Property svn:executable set to *
File size: 744 bytes
Line 
1#!/bin/sh
2
3QMKSPEC=$1
4VERBOSE=$2
5SRCDIR=$3
6OUTDIR=$4
7
8# debuggery
9[ "$VERBOSE" = "yes" ] && echo "Testing size of pointers ... ($*)"
10
11# build and run a test program
12test -d "$OUTDIR/config.tests/unix/ptrsize" || mkdir -p "$OUTDIR/config.tests/unix/ptrsize"
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
14cd "$OUTDIR/config.tests/unix/ptrsize"
15
16if [ "$VERBOSE" = "yes" ]; then
17 ($MAKE clean && $MAKE)
18else
19 ($MAKE clean && $MAKE) >/dev/null 2>&1
20fi
21RETVAL=$?
22
23if [ "$RETVAL" -ne 0 ]; then
24 PTRSIZE=4
25else
26 PTRSIZE=8
27fi
28
29
30# done
31[ "$VERBOSE" = "yes" ] && echo "Pointer size: $PTRSIZE"
32exit $PTRSIZE
Note: See TracBrowser for help on using the repository browser.