[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kbuild-devel
Subject:    [kbuild-devel] Re: Extending CML2 menus
From:       "Eric S. Raymond" <esr () thyrsus ! com>
Date:       2001-11-27 17:51:26
[Download RAW message or body]

Keith Owens <kaos@ocs.com.au>:
> For kbuild 2.5 I need to add a couple of sub-menus on the end of the
> main menu.  How do I do that?  The "obvious" attempt at extending the
> menu did not work.  I defined rules-2.5.cml containing this
> 
> source "rules.cml"
> 
> symbols
> FOO     'foo'
> BAR     'bar'
> kao     'kao'
> 
> menu kao        # kao
>         FOO
>         BAR
> 
> menu main
>         kao
> 
> It sort of works.  kao appears at the end of the main menu but it
> appears as a data item instead of another menu.  Also it is conditioned
> by the visibility of the previous menu (kernel debugging).
> 
> Dynamic extension of menus is required to support separate compilation,
> e.g. a new file system will extend the fs menu.

OK, there were two errors here.  First, the above snippet declares `kao' as
a symbol and then annotates it as a menu.  I have added code to detect this
case and complain.  Second, you had EXPERT off and didn't supply a help entry
for kao, so it was rendered invisible.

Try this:

source "rules.cml"

symbols
FOO     'foo'
BAR     'bar'

menus kao "kaos's sample menu"

menu kao        # kao
        FOO
        BAR

menu main
        kao

Be sure to enable EXPERT.
-- 
		<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>

"Experience should teach us to be most on our guard to protect liberty when the
government's purposes are beneficient...The greatest dangers to liberty lurk in
insidious encroachment by men of zeal, well meaning but without understanding."
	-- Supreme Court Justice Louis Brandeis

_______________________________________________
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic