diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
commit | d6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch) | |
tree | e2be02f33984c48ec019c654051d27964e42c441 /scripts/Configure | |
parent | 609d1e803baf519487233b765eb487f9ec227a18 (diff) |
Merge with 2.3.19.
Diffstat (limited to 'scripts/Configure')
-rw-r--r-- | scripts/Configure | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/scripts/Configure b/scripts/Configure index 80eefc7e1..0f89d25a9 100644 --- a/scripts/Configure +++ b/scripts/Configure @@ -143,6 +143,10 @@ function comment () { # define_bool define value # function define_bool () { + define_tristate $1 $2 +} + +function define_tristate () { case "$2" in "y") echo "$1=y" >>$CONFIG @@ -213,11 +217,11 @@ function tristate () { while :; do readln "$1 ($2) [$defprompt] " "$def" "$old" case "$ans" in - [yY] | [yY]es ) define_bool "$2" "y" + [yY] | [yY]es ) define_tristate "$2" "y" break ;; - [nN] | [nN]o ) define_bool "$2" "n" + [nN] | [nN]o ) define_tristate "$2" "n" break ;; - [mM] ) define_bool "$2" "m" + [mM] ) define_tristate "$2" "m" break ;; * ) help "$2" ;; @@ -246,7 +250,7 @@ function dep_tristate () { while [ $# -gt 0 ]; do case "$1" in n) - define_bool "$var" "n" + define_tristate "$var" "n" return ;; m) @@ -268,9 +272,9 @@ function dep_tristate () { while :; do readln "$ques ($var) [$defprompt] " "$def" "$old" case "$ans" in - [nN] | [nN]o ) define_bool "$var" "n" + [nN] | [nN]o ) define_tristate "$var" "n" break ;; - [mM] ) define_bool "$var" "m" + [mM] ) define_tristate "$var" "m" break ;; [yY] | [yY]es ) echo echo " This answer is not allowed, because it is not consistent with" @@ -290,6 +294,23 @@ function dep_tristate () { fi } +function dep_bool () { + ques=$1 + var=$2 + shift 2 + while [ $# -gt 0 ]; do + case "$1" in + m | n) + define_bool "$var" "n" + return + ;; + esac + shift + done + + bool "$ques" "$var" +} + # # define_int sets the value of a integer argument # |