Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2827

Show
Ignore:
Timestamp:
11/09/07 07:54:50 (1 year ago)
Author:
larsivi
Message:

Error checking and fallback method. closes #658

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/build-gdc-mac.sh

    r2242 r2827  
    11#!/bin/sh 
    22 
     3FAILED=0 
    34# Written by Anders F. Björklund 
    45cd "`dirname \"$0\"`" 
     
    3839for lib in $LIBS; do test -r $lib && rm $lib; done 
    3940 
    40 ./build-gdc-x.sh powerpc-apple-darwin8 
    41 for lib in $LIBS; do mv $lib $lib.ppc; done 
     41if [ "`./build-gdc-x.sh powerpc-apple-darwin8 1>&2`" = "0" ] 
     42then 
     43    for lib in $LIBS; do mv $lib $lib.ppc; done 
     44else 
     45    FAILED=1 
     46fi 
    4247 
    43 ./build-gdc-x.sh i686-apple-darwin8 
    44 for lib in $LIBS; do mv $lib $lib.i386; done 
     48if [ "$FAILED" = "0" ] 
     49then 
     50    if [ "`./build-gdc-x.sh i686-apple-darwin8 1>&2`" = "0" ] 
     51    then 
     52        for lib in $LIBS; do mv $lib $lib.i386; done 
     53    else 
     54        FAILED=1 
     55    fi 
     56fi 
    4557 
    46 for lib in $LIBS; do \ 
    47 lipo -create -output $lib $lib.ppc $lib.i386; done 
    48  
     58if [ "$FAILED" = "1" ] 
     59then 
     60    echo 'Failed to build universal binaries. Trying GDC.' 
     61    ./build-gdc.sh 
     62else 
     63    for lib in $LIBS; do \ 
     64    lipo -create -output $lib $lib.ppc $lib.i386; done 
     65fi 
  • trunk/lib/build-gdc-x.sh

    r2465 r2827  
    11#!/bin/bash 
     2 
     3die() { 
     4    echo "$1" 
     5    exit $2 
     6} 
     7 
    28cd "`dirname $0`" 
    39 
     
    1420    CONFIGURE_FLAGS="--enable-phobos-config-dir=$2" 
    1521fi 
     22 
     23$HOST-gdc --help >& /dev/null || die "$HOST-gdc not found on your \$PATH!" 1 
     24 
    1625HOST_ARCH="`echo $HOST | sed 's/-.*//'`" 
    1726ADD_CFLAGS=