config: simplify setting CONFIG_SHELL, add a bit to the help entry
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Oct 11 21:43:42 2011 +0200 (2011-10-11)
changeset 270580a09cf51c87
parent 2704 fcf5c43cf30f
child 2706 30c89d1f74a4
config: simplify setting CONFIG_SHELL, add a bit to the help entry

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
config/global/build-behave.in
scripts/crosstool-NG.sh.in
     1.1 --- a/config/global/build-behave.in	Mon Oct 10 00:00:58 2011 +0200
     1.2 +++ b/config/global/build-behave.in	Tue Oct 11 21:43:42 2011 +0200
     1.3 @@ -78,6 +78,10 @@
     1.4        
     1.5        The default is to use bash, as some components (eg. GMP) will fail
     1.6        to build with anything else than bash.
     1.7 +      
     1.8 +      Unless you have a very strong reason not to (eg. you are debugging
     1.9 +      the bashisms in a ./configure script), you should use the default,
    1.10 +      and use bash.
    1.11  
    1.12  config CONFIG_SHELL_ASH
    1.13      bool
    1.14 @@ -109,15 +113,20 @@
    1.15  
    1.16  endchoice
    1.17  
    1.18 -config CONFIG_SHELL
    1.19 -    string
    1.20 -    default "sh"        if CONFIG_SHELL_SH
    1.21 -    default "ash"       if CONFIG_SHELL_ASH
    1.22 -    default "bash"      if CONFIG_SHELL_BASH
    1.23 -    default "custom"    if CONFIG_SHELL_CUSTOM || BACKEND
    1.24 -
    1.25 +# Do not put this into the choice above, because the choice
    1.26 +# is not available in BACKEND-mode, while we do want this to
    1.27 +# be set even in BACKEND-mode.
    1.28  config CONFIG_SHELL_CUSTOM_PATH
    1.29      string
    1.30      prompt "Path to custom shell" if ! BACKEND
    1.31      depends on CONFIG_SHELL_CUSTOM || BACKEND
    1.32      default "/bin/sh"
    1.33 +
    1.34 +# Ditto.
    1.35 +# And we must use the ./configured bash...
    1.36 +config CONFIG_SHELL
    1.37 +    string
    1.38 +    default "/bin/sh"                   if CONFIG_SHELL_SH
    1.39 +    default "/bin/ash"                  if CONFIG_SHELL_ASH
    1.40 +    default "${bash}"                   if CONFIG_SHELL_BASH
    1.41 +    default CONFIG_SHELL_CUSTOM_PATH    if CONFIG_SHELL_CUSTOM || BACKEND
     2.1 --- a/scripts/crosstool-NG.sh.in	Mon Oct 10 00:00:58 2011 +0200
     2.2 +++ b/scripts/crosstool-NG.sh.in	Tue Oct 11 21:43:42 2011 +0200
     2.3 @@ -66,18 +66,8 @@
     2.4  CT_TestAndAbort "Your file system in '${CT_WORK_DIR}' is *not* case-sensitive!" -f "${CT_WORK_DIR}/FOO"
     2.5  CT_DoExecLog DEBUG rm -f "${CT_WORK_DIR}/foo"
     2.6  
     2.7 -# What's our shell?
     2.8 -# Will be plain /bin/sh on most systems, except if we have /bin/ash and we
     2.9 -# _explictly_ required using it
    2.10 -case "${CT_CONFIG_SHELL}" in
    2.11 -    sh)     CT_SHELL="/bin/sh";;
    2.12 -    ash)    CT_SHELL="/bin/ash";;
    2.13 -    bash)   CT_SHELL="${BASH}";;
    2.14 -    custom) CT_SHELL="${CT_CONFIG_SHELL_CUSTOM_PATH}";;
    2.15 -esac
    2.16 -
    2.17  # Check the user is using an existing SHELL to be used by ./configure and Makefiles
    2.18 -CT_TestOrAbort "The CONFIG_SHELL '${CT_CONFIG_SHELL}' (${CT_SHELL}) is not valid" -f "${CT_SHELL}" -a -x "${CT_SHELL}"
    2.19 +CT_TestOrAbort "The CONFIG_SHELL '${CT_CONFIG_SHELL}' is not valid" -f "${CT_CONFIG_SHELL}" -a -x "${CT_CONFIG_SHELL}"
    2.20  
    2.21  # Create the bin-override early
    2.22  # Contains symlinks to the tools found by ./configure
    2.23 @@ -484,8 +474,8 @@
    2.24  
    2.25      # Set the shell to be used by ./configure scripts and by Makefiles (those
    2.26      # that support it!).
    2.27 -    export CONFIG_SHELL="${CT_SHELL}"   # for ./configure
    2.28 -    export SHELL="${CT_SHELL}"          # for Makefiles
    2.29 +    export CONFIG_SHELL="${CT_CONFIG_SHELL}"    # for ./configure
    2.30 +    export SHELL="${CT_CONFIG_SHELL}"           # for Makefiles
    2.31  
    2.32      # And help make go faster
    2.33      JOBSFLAGS=