patch-2.0.34 linux/scripts/Menuconfig

Next file: linux/scripts/lxdialog/checklist.c
Previous file: linux/scripts/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.33/linux/scripts/Menuconfig linux/scripts/Menuconfig
@@ -21,6 +21,14 @@
 #
 # Please send comments / questions / bug fixes to roadcapw@titus.org
 #
+# 070498 Stepan Kasal <kasal@math.cas.cz> - one change borrowed
+# from 2.1.x version:
+#     131197 Michael Chastain (mec@shout.net) - output all lines for a
+#     choice list, not just the selected one.  This makes the output
+#     the same as Configure output, which is important for smart config
+#     dependencies.
+# It also fixes the bug when menuconfig sets CONFIG_M386=y every time
+# it is ran.
 #----------------------------------------------------------------------------
 
 #
@@ -62,10 +70,10 @@
 }
 
 #
-# Don't need this yet, but we don't want to puke either.
+# Define a boolean to a specific value.
 #
 function define_bool () {
-	:	
+	eval $1=$2
 }
 
 #
@@ -972,11 +980,19 @@
 		: ${current:=$default}
 
 		#
-		# Then extract the actual option from the list of choices.
+		# Output all choices (to be compatible with other configs).
 		#
-		current=${choices#*$current} ; set $current
-
-		define_bool "$1" "y"
+		set -- $choices
+		while [ -n "$2" ]
+		do
+			if eval [ "$1" = "$current" ]
+			then
+			    define_bool "$2" "y"
+			else
+			    define_bool "$2" "n"
+			fi
+			shift ; shift
+		done
 	}
 
 	function mainmenu_name () {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov