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

Changeset 3275

Show
Ignore:
Timestamp:
02/24/08 07:08:05 (9 months ago)
Author:
larsivi
Message:

Only turn on warnings when explicitly requested.

Files:

Legend:

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

    r3205 r3275  
    1919Options: 
    2020  --help: Will print this help text 
     21  --warn: Will enable warnings 
    2122  <identifier> is one of {dmd, gdc, mac} and will build libtango.a, 
    2223                libgtango.a or universal Mac binaries respectively 
     
    3031UNAME=`uname` 
    3132INLINE="-inline" 
     33WARN="" 
    3234 
    3335# Compiler specific includes 
     
    9193    if filter $OBJNAME 
    9294    then 
    93         $DC -w -c $INLINE -release -O -version=Posix -version=Tango -of$OBJNAME $FILENAME 
     95        $DC $WARN -c $INLINE -release -O -version=Posix -version=Tango -of$OBJNAME $FILENAME 
    9496        ar -r lib/$LIB $OBJNAME 2>&1 | grep -v "ranlib: .* has no symbols" 
    9597        rm $OBJNAME 
     
    135137fi 
    136138 
    137 if [ "$1" = "--help" ] 
    138 then 
    139     usage 
    140 elif [ "$1" = "dmd" ] 
    141 then 
    142     build dmd libtango-user-dmd.a libtango-base-dmd.a 
    143 elif [ "$1" = "gdc" ] 
    144 then 
    145     build gdmd libgtango.a libgphobos.a 
    146 elif [ "$1" = "mac" ] 
    147 then 
    148     # build Universal Binary version of the Tango library 
    149     build powerpc-apple-darwin8-gdmd libgtango.a.ppc libgphobos.a.ppc 
    150     build i686-apple-darwin8-gdmd libgtango.a.i386 libgphobos.a.i386 
    151     lipo -create -output libgtango.a libgtango.a.ppc libgtango.a.i386 
    152 else 
    153     usage 
    154 fi 
     139while [ "$#" != "0" ] 
     140do 
     141    case "$1" in 
     142        --help) 
     143            usage 
     144            ;; 
     145        --warn) 
     146            WARN="-w" 
     147            ;; 
     148        dmd) 
     149            build dmd libtango-user-dmd.a libtango-base-dmd.a 
     150            ;; 
     151        gdc) 
     152            build gdmd libgtango.a libgphobos.a 
     153            ;; 
     154        mac) 
     155            # build Universal Binary version of the Tango library 
     156            build powerpc-apple-darwin8-gdmd libgtango.a.ppc libgphobos.a.ppc 
     157            build i686-apple-darwin8-gdmd libgtango.a.i386 libgphobos.a.i386 
     158            lipo -create -output libgtango.a libgtango.a.ppc libgtango.a.i386 
     159            ;; 
     160        *) 
     161            usage 
     162            ;; 
     163    esac 
     164    shift 
     165done