Messages in this thread | | | Date | Wed, 6 Jan 1999 09:37:01 +0000 (GMT) | From | Riley Williams <> | Subject | Re: Some config/menuconfig/xconfig fixes |
| |
Hi Michael.
>> - Not compatible dep_tristate in Menuconfig and Configure >> (if dependency was set to "n" Configure disables option, >> Menuconfig does not). Fixed by modifying Menuconfig.
> Good idea, but it needs to call define_bool so that tests further > down will get the right value. Can you try this patch instead:
> The patch is short so I'm appending it to this letter too.
Maybe I'm being silly, but...
> diff -u -r -N linux-2.2.0-pre2/scripts/Menuconfig linux/scripts/Menuconfig > --- linux-2.2.0-pre2/scripts/Menuconfig Wed Dec 30 03:27:06 1998 > +++ linux/scripts/Menuconfig Thu Dec 31 01:18:43 1998
> @@ -177,17 +181,13 @@ > # else in the kernel. > # > function dep_tristate () { > - if [ "$CONFIG_MODULES" != "y" ] > - then > - bool "$1" "$2" > - else > - if eval [ "_$3" != "_m" ] > - then > - tristate "$1" "$2" $3 > - else > - mod_bool "$1" "$2" > - fi > - fi > + if [ "$3" = "y" ]; then > + tristate "$1" "$2" > + else if [ "$3" = "m" ]; then > + mod_bool "$1" "$2" > + else > + define_bool "$2" "$n" > + fi; fi > } > > #
Two queries:
1. Surely that "$n" should be "n" ???
2. It looks ugly. Why not use case - esac like you do in the following patch? As an example...
case _$3 in _y) tristate "$1" "$2" ;; _m) mod_bool "$1" "$2" ;; _*) define_bool "$2" "n" ;; esac
> @@ -372,16 +372,20 @@ > # Same as bool() except options are (Module/No) > # > function mod_bool () { > - set_x_info "$2" "n" > - > - case $x in > - y|m) flag='M' ;; > - *) flag=' ' ;; > - esac > - > - echo -ne "'$2' '<$flag> $1$info' " >>MCmenu > - > - echo -e "function $2 () { l_mod_bool '$2' \"\$1\" ;}" >>MCradiolists > + if [ "$CONFIG_MODULES" != "y" ]; then > + define_bool "$2" "n" > + else > + set_x_info "$2" "n" > + > + case $x in > + y|m) flag='M' ;; > + *) flag=' ' ;; > + esac > + > + echo -ne "'$2' '<$flag> $1$info' " >>MCmenu > + > + echo -e "function $2 () { l_mod_bool '$2' \"\$1\" ;}" >>MCradiolists > + fi > } > > #
Best wishes from Riley.
--- * ftp://ps.cus.umist.ac.uk/pub/rhw/Linux * http://ps.cus.umist.ac.uk/~rhw/kernel.versions.html
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |