X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=make.sh;h=e054c72c2ea73cc7b57a590931a1fd30147f3d31;hb=ba12c5c0420f28250ef4931b47af92c6d7963195;hp=599c8da8399df8ff0963d89b25435b74d8baa3f6;hpb=202dd54e4d66d5cd073e281ed32663143b5b2c0c;p=sbcl.git diff --git a/make.sh b/make.sh index 599c8da..e054c72 100755 --- a/make.sh +++ b/make.sh @@ -45,36 +45,56 @@ 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 + ;; + --dynamic-space-size=) + $optarg_ok && SBCL_DYNAMIC_SPACE_SIZE=$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 < Default dynamic-space size for target. + + This specifies the default dynamic-space size for the SBCL + being built. If you need to control the dynamic-space size + of the host SBCL, use the --xc-host option. + + If not provided, the default is platform-specific. is + taken to be megabytes unless explicitly suffixed with Gb in + order to specify the size in gigabytes. + --xc-host= Specify the Common Lisp compilation host. The string provided should be a command to invoke the @@ -138,8 +168,10 @@ echo "//Starting build: $build_started" # Apparently option parsing succeeded. Print out the results. echo "//Options: --prefix='$SBCL_PREFIX' --xc-host='$SBCL_XC_HOST'" +mkdir -p output # Save prefix for make and install.sh. echo "SBCL_PREFIX='$SBCL_PREFIX'" > output/prefix.def +echo "$SBCL_DYNAMIC_SPACE_SIZE" > output/dynamic-space-size.txt # FIXME: Tweak this script, and the rest of the system, to support # a second bootstrapping pass in which the cross-compilation host is @@ -160,6 +192,9 @@ export DEVNULL . ./find-gnumake.sh find_gnumake +. ./generate-version.sh +generate_version + # If you're cross-compiling, you should probably just walk through the # make-config.sh script by hand doing the right thing on both the host # and target machines. @@ -222,6 +257,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 <