3 # Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved.
5 herefromroot
="prebuilt/macosx"
8 if [ "`id -un`" != "root" ] ; then
9 echo "You must execute this script as root!"
10 echo "Try executing the command:"
15 export INSTALL_PREFIX
="/Library/Gambit-C"
19 for VARIANT
in intel32 intel64
; do
24 intel32
) CONFIG_ARCH
="-arch i386"
25 CONFIG_BUILD
="--build=i386-apple-darwin9"
28 intel64
) CONFIG_ARCH
="-arch x86_64 -m64"
29 CONFIG_BUILD
="--build=i386-apple-darwin9"
32 G3
) CONFIG_ARCH
="-arch ppc750"
33 CONFIG_BUILD
="--build=powerpc-apple-darwin9"
36 G4
) CONFIG_ARCH
="-arch ppc7400"
37 CONFIG_BUILD
="--build=powerpc-apple-darwin9"
40 G5
) CONFIG_ARCH
="-arch ppc970 -m64"
41 CONFIG_BUILD
="--build=powerpc-apple-darwin9"
44 universal
) CONFIG_ARCH
="-arch i386 -arch ppc750"
50 SYSROOT
="/Developer/SDKs/MacOSX10.6.sdk"
52 CFLAGS
="-isysroot $SYSROOT $CONFIG_ARCH" LDFLAGS
="-mmacosx-version-min=10.5 -Wl,-syslibroot,$SYSROOT $CONFIG_ARCH" .
/configure
"$CONFIG_BUILD" --prefix="$INSTALL_PREFIX" --enable-multiple-versions --enable-symlinks --enable-single-host # --enable-gcc-opts
58 .
/build-phase2
"$VARIANT" "$RUN_TESTS" > build-phase2.out
64 if fgrep
"************ TESTS SUCCESSFUL" build-phase2.out
> /dev
/null
; then
67 if fgrep
"************ TESTS SKIPPED" build-phase2.out
> /dev
/null
; then
72 rm -f build-phase2.out
74 if [ "$SUCCESS" == "1" ] ; then
75 echo "************ BUILD SUCCESSFUL ($VARIANT variant)"
77 echo "************ BUILD FAILED ($VARIANT variant)"
83 echo "************ macosx BUILD SUCCESSFUL"