From: Nikodemus Siivola Date: Wed, 18 Aug 2010 14:49:27 +0000 (+0000) Subject: 1.0.41.52: more make.sh tweakery X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=f5fcb637f2f5a67bfb8eef76f74e488013e8cb45;p=sbcl.git 1.0.41.52: more make.sh tweakery * Empty string as the value for an option is treated as if the option wasn't provided at all, which makes scripting builds easier. * Temporary support for legacy-style xc host specifications for the benefit of clbuild &co. Add a noisy message to the end of the build so people will hopefully notice. --- diff --git a/make.sh b/make.sh index 599c8da..37e16d9 100755 --- a/make.sh +++ b/make.sh @@ -45,36 +45,53 @@ bad_option() { 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 <