X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=make.sh;h=39cf8023e685ee5fc68dc9e434933fbf068f6bea;hb=0413e8c9a18ec14710d48f8d3dd6f453fa582457;hp=c60f9fa110164ca279f0f651aeee2a2398651ead;hpb=9e4ba79747ea69dc33ef9f6014571dd098d1568d;p=sbcl.git diff --git a/make.sh b/make.sh index c60f9fa..39cf802 100755 --- a/make.sh +++ b/make.sh @@ -39,33 +39,62 @@ SBCL_XC_HOST="sbcl --disable-debugger --no-userinit --no-sysinit" export SBCL_XC_HOST # Parse command-line options. +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" : '[^=]*=\(.*\)'` - option=`expr "X$option" : 'X\([^=]*\)=.*'` - ;; + # For ease of scripting treat skip valued options with empty + # values. + optarg=`expr "X$option" : '[^=]*=\(.*\)'` || optarg_ok=false + option=`expr "X$option" : 'X\([^=]*=\).*'` + ;; *) optarg="" - ;; + ;; esac case $option in --help | -help | -h) - print_help="yes" ;; - --prefix) - SBCL_PREFIX=$optarg ;; - --xc-host) - SBCL_XC_HOST=$optarg ;; - - *) - echo "Unknown command-line option to $0: $option" - print_help="yes" + print_help="yes" ;; + --prefix=) + $optarg_ok && SBCL_PREFIX=$optarg + ;; + --xc-host=) + $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 @@ -120,16 +159,6 @@ Options: Use an existing CMU CL binary as a cross-compilation host when you have weird things in your .cmucl-init file. - - "openmcl --batch" - Use an OpenMCL binary as a cross-compilation host. - - "clisp" - Use a CLISP binary as a cross-compilation host. - Note: historically clisp hosted builds have been - frequently broken. While reports of this are always - appreciated, bootstrapping another host is - recommended. EOF exit fi @@ -139,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 @@ -223,6 +254,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 <