<unlurk>
"Eric S. Raymond" wrote: > > John Cowan has proposed allowing the default expression in a choice to be > a string-valued derive that must be the name of a choice. This kind of > type punning makes me cringe, and anyway it would be hard to check at compile > time that the returned string is necessarily valid. > > I think I may have a better idea. Let the default be a ? : name-valued > expression. So your format choice could look something like this: > > choices kernel_format > VMLINUX VMLINUZ IMAGE ZIMAGE BZIMAGE > default ((X86 or IA64 or SPARC) ? VMLINUZ : BZIMAGE) > > This kind of expression would be pretty easy to check at compile time. Wouldn't it be simpler to allow the rules file to not specify a `default'? The runtime semantics of this would be that the first unsuppressed choice is displayed as the default. So Keith could write: choices kernel_format # The format that the kernel is to be compiled in BZIMAGE ZIMAGE VMLINUZ VMLINUX unless IA64 suppress VMLINUZ BZIMAGE ZIMAGE The default choice the user sees is the first of BZIMAGE, ZIMAGE, VMLINUZ or VMLINUX which is supported on the chosen architecture. On IA64 the only choice would be VMLINUX. Greg. -- the price of civilisation today is a courageous willingness to prevail, with force, if necessary, against whatever vicious and uncomprehending enemies try to strike it down. - Roger Sandall, The Age, 28Sep2001. _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel