X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fconfigure;h=3abe43bad101c284924d9c2f3d0fd982ea792fc5;hb=0c6fc352d62ead35a1ba37950812a236ce353197;hp=00f695fefee1437062723584686263f4b3c64ed5;hpb=8f712ab83c1973c8d74bfc1c34598d95881e96ee;p=mono.git diff --git a/mcs/configure b/mcs/configure index 00f695fefee..3abe43bad10 100755 --- a/mcs/configure +++ b/mcs/configure @@ -3,7 +3,8 @@ help() { echo "" - echo "Usage is: configure [--prefix=PREFIX] [--profile=PROFILE]\n" + echo "Usage is: configure [--prefix=PREFIX] [--profile=PROFILE]" + echo "" echo "Profiles available: " (cd build/profiles; ls *.make | sed -e 's/.make//' -e 's/^/ /') } @@ -11,29 +12,47 @@ help() prefix=/usr/local profile=default -for a in $*; do - case $a in - --help) - help - exit 0 - ;; - --prefix=*) - prefix=`echo $a | sed 's/--prefix=//'`; - ;; - --profile=*) - profile=`echo $a | sed 's/--profile=//'`; - if test ! -f build/profiles/$profile.make; then - echo "" - echo Error, profile $profile does not exist - help - exit 1; - fi - ;; - *) - echo Unknown option: $a - help - exit 1 - esac +while [ $# -ne 0 ]; do + case $1 in + --help) + help + exit 0 + ;; + --prefix=*) + prefix=`echo $1 | sed 's/--prefix=//'`; + shift + ;; + --prefix) + shift + prefix="$1" + shift + ;; + --profile=*) + profile=`echo $1 | sed 's/--profile=//'` + shift + if test ! -f build/profiles/$profile.make; then + echo "" + echo Error, profile $profile does not exist + help + exit 1; + fi + ;; + --profile) + shift + profile="$1" + shift + if test ! -f build/profiles/$profile.make; then + echo "" + echo Error, profile $profile does not exist + help + exit 1; + fi + ;; + *) + echo Unknown option: $1 + help + shift + esac done echo "prefix=$prefix" > build/config.make @@ -47,4 +66,4 @@ echo " Profile selected: $profile" echo " Prefix: $prefix" echo "" -exit 0; \ No newline at end of file +exit 0;