# HG changeset patch # User "Yann E. MORIN" # Date 1318362222 -7200 # Node ID 80a09cf51c8757d86518bd16d2180fefd0755692 # Parent fcf5c43cf30f11366d4fe16ee19d6c2143985c62 config: simplify setting CONFIG_SHELL, add a bit to the help entry Signed-off-by: "Yann E. MORIN" diff -r fcf5c43cf30f -r 80a09cf51c87 config/global/build-behave.in --- a/config/global/build-behave.in Mon Oct 10 00:00:58 2011 +0200 +++ b/config/global/build-behave.in Tue Oct 11 21:43:42 2011 +0200 @@ -78,6 +78,10 @@ The default is to use bash, as some components (eg. GMP) will fail to build with anything else than bash. + + Unless you have a very strong reason not to (eg. you are debugging + the bashisms in a ./configure script), you should use the default, + and use bash. config CONFIG_SHELL_ASH bool @@ -109,15 +113,20 @@ endchoice -config CONFIG_SHELL - string - default "sh" if CONFIG_SHELL_SH - default "ash" if CONFIG_SHELL_ASH - default "bash" if CONFIG_SHELL_BASH - default "custom" if CONFIG_SHELL_CUSTOM || BACKEND - +# Do not put this into the choice above, because the choice +# is not available in BACKEND-mode, while we do want this to +# be set even in BACKEND-mode. config CONFIG_SHELL_CUSTOM_PATH string prompt "Path to custom shell" if ! BACKEND depends on CONFIG_SHELL_CUSTOM || BACKEND default "/bin/sh" + +# Ditto. +# And we must use the ./configured bash... +config CONFIG_SHELL + string + default "/bin/sh" if CONFIG_SHELL_SH + default "/bin/ash" if CONFIG_SHELL_ASH + default "${bash}" if CONFIG_SHELL_BASH + default CONFIG_SHELL_CUSTOM_PATH if CONFIG_SHELL_CUSTOM || BACKEND diff -r fcf5c43cf30f -r 80a09cf51c87 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Mon Oct 10 00:00:58 2011 +0200 +++ b/scripts/crosstool-NG.sh.in Tue Oct 11 21:43:42 2011 +0200 @@ -66,18 +66,8 @@ CT_TestAndAbort "Your file system in '${CT_WORK_DIR}' is *not* case-sensitive!" -f "${CT_WORK_DIR}/FOO" CT_DoExecLog DEBUG rm -f "${CT_WORK_DIR}/foo" -# What's our shell? -# Will be plain /bin/sh on most systems, except if we have /bin/ash and we -# _explictly_ required using it -case "${CT_CONFIG_SHELL}" in - sh) CT_SHELL="/bin/sh";; - ash) CT_SHELL="/bin/ash";; - bash) CT_SHELL="${BASH}";; - custom) CT_SHELL="${CT_CONFIG_SHELL_CUSTOM_PATH}";; -esac - # Check the user is using an existing SHELL to be used by ./configure and Makefiles -CT_TestOrAbort "The CONFIG_SHELL '${CT_CONFIG_SHELL}' (${CT_SHELL}) is not valid" -f "${CT_SHELL}" -a -x "${CT_SHELL}" +CT_TestOrAbort "The CONFIG_SHELL '${CT_CONFIG_SHELL}' is not valid" -f "${CT_CONFIG_SHELL}" -a -x "${CT_CONFIG_SHELL}" # Create the bin-override early # Contains symlinks to the tools found by ./configure @@ -484,8 +474,8 @@ # Set the shell to be used by ./configure scripts and by Makefiles (those # that support it!). - export CONFIG_SHELL="${CT_SHELL}" # for ./configure - export SHELL="${CT_SHELL}" # for Makefiles + export CONFIG_SHELL="${CT_CONFIG_SHELL}" # for ./configure + export SHELL="${CT_CONFIG_SHELL}" # for Makefiles # And help make go faster JOBSFLAGS=