patch-2.2.16 linux/scripts/Configure
Next file: linux/scripts/Menuconfig
Previous file: linux/net/unix/af_unix.c
Back to the patch index
Back to the overall index
- Lines: 104
- Date:
Wed Jun 7 14:26:44 2000
- Orig file:
v2.2.15/linux/scripts/Configure
- Orig date:
Mon Feb 1 12:03:20 1999
diff -urN v2.2.15/linux/scripts/Configure linux/scripts/Configure
@@ -143,6 +143,10 @@
# 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 @@
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 @@
while [ $# -gt 0 ]; do
case "$1" in
n)
- define_bool "$var" "n"
+ define_tristate "$var" "n"
return
;;
m)
@@ -268,9 +272,9 @@
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,43 @@
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"
+}
+
+function dep_mbool () {
+ ques=$1
+ var=$2
+ shift 2
+ while [ $# -gt 0 ]; do
+ case "$1" in
+ n)
+ define_bool "$var" "n"
+ return
+ ;;
+ m)
+ eval "$var=y"
+ ;;
+ esac
+ shift
+ done
+
+ bool "$ques" "$var"
+}
+
#
# define_int sets the value of a integer argument
#
@@ -368,9 +409,9 @@
# define_string define value
#
function define_string () {
- echo "$1="'"'$2'"' >>$CONFIG
- echo "#define $1 "'"'$2'"' >>$CONFIG_H
- eval "$1=$2"
+ echo "$1=\"$2\"" >>$CONFIG
+ echo "#define $1 \"$2\"" >>$CONFIG_H
+ eval "$1=\"$2\""
}
#
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)