X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=make.sh;h=30a91a8318282a6ab3ad545f82567cbbbb3482b2;hb=26d0559df82a00acf85b8ec89541ee8e09bb3e55;hp=8ab680dda7e84a0b3d974b9b49d784d15274252b;hpb=57bf8a7e65a81a8cff946a65e7e33e3f9b948ac6;p=sbcl.git diff --git a/make.sh b/make.sh index 8ab680d..30a91a8 100755 --- a/make.sh +++ b/make.sh @@ -39,42 +39,59 @@ SBCL_XC_HOST="sbcl --disable-debugger --no-userinit --no-sysinit" export SBCL_XC_HOST # Parse command-line options. -function bad_option() { +bad_option() { echo $1 echo "Enter \"$0 --help\" for list of valid options." exit 1 } +some_options=false for option do + optarg_ok=true # Split --foo=bar into --foo and bar. case $option in *=*) - optarg=`expr "X$option" : '[^=]*=\(.*\)'` || true + # For ease of scripting treat skip valued options with empty + # values. + optarg=`expr "X$option" : '[^=]*=\(.*\)'` || optarg_ok=false option=`expr "X$option" : 'X\([^=]*=\).*'` - if test -z "$optarg" - then - bad_option "Command-line option has no value: $option" - fi - ;; + ;; *) optarg="" - ;; + ;; esac case $option in --help | -help | -h) - print_help="yes" ;; + print_help="yes" ;; --prefix=) - SBCL_PREFIX=$optarg ;; + $optarg_ok && SBCL_PREFIX=$optarg + ;; --xc-host=) - SBCL_XC_HOST=$optarg ;; - - *) - bad_option "Unknown command-line option to $0: \"$option\"" + $optarg_ok && SBCL_XC_HOST=$optarg + ;; + -*) + bad_option "Unknown command-line option to $0: \"$option\"" + ;; + *) + if $some_options + then + bad_option "Unknown command-line option to $0: \"$option\"" + else + legacy_xc_spec=$option + fi + ;; esac + some_options=true done +# Previously XC host was provided as a positional argument. +if test -n "$legacy_xc_spec" +then + SBCL_XC_HOST="$legacy_xc_spec" +fi + if test "$print_help" = "yes" then cat < output/prefix.def # FIXME: Tweak this script, and the rest of the system, to support @@ -222,6 +240,23 @@ echo "To install SBCL (more information in INSTALL):" echo echo " sh install.sh" +# This is probably the best place to ensure people will see this. +if test -n "$legacy_xc_spec" +then + echo <