summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-08-02 21:43:15 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-08-02 21:43:15 (GMT)
commita08142a02a84eaf42c148a9a41f9e2bed83fba73 (patch)
tree494bf262564f6c940eb20c66410e64bd6f5f82e5 /scripts
parentc0483fc7ec4a0b6ecfaa3d8b5ccc27a8a2a11fde (diff)
[config] Change the way to select the CONFIG_SHELL
Transform the single boolean option to a 'choice' selection with two options: "sh" and "ash". This is needed to later add "bash" as override.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/crosstool-NG.sh.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 36c77ba..d4299c3 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -63,8 +63,13 @@ 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
-CT_SHELL="/bin/sh"
-[ "${CT_CONFIG_SHELL_ASH}" = "y" -a -x "/bin/ash" ] && CT_SHELL="/bin/ash"
+case "${CT_CONFIG_SHELL}" in
+ sh) CT_SHELL="/bin/sh";;
+ ash) CT_SHELL="/bin/ash";;
+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}"
# Create the bin-overide early
# Contains symlinks to the tools found by ./configure
@@ -452,7 +457,8 @@ if [ -z "${CT_RESTART}" ]; then
# Set the shell to be used by ./configure scripts and by Makefiles (those
# that support it!).
- export CONFIG_SHELL="${CT_SHELL}"
+ export CONFIG_SHELL="${CT_SHELL}" # for ./configure
+ export SHELL="${CT_SHELL}" # for Makefiles
# And help make go faster
PARALLELMFLAGS=