Hello all!

Sorry to jump into the discussion, but...

On Thursday 24 May 2007 08:40, Sam Ravnborg wrote:
> The intent with this is clear but the solution you suggest albeit simple
> does not really match where we could end up with kconfig.
> Recently Roman added support for options in the kconfig language
> and I would assume we could deal with most of this just using options.
> One example could be to support options for the mainmenu entrye like this:
> mainmenu "Busybow config system"
>       option project="Busybox"
>       option version="$VERSION"   <= Where '$' signify an environment variable

I would rather suggest a kind of 'namespace' thing. This way, one could use
the kconfig language for a project (eg. buildroot) and include sub-Kconfig
files from other sub-projects (eg. kernel), thus making all configurable
from the same menu.

Something like (syntax proposal):

mainmenu "Buildroot config system"
    option prefix=""                <= prefix to config options

config foo                          => foo=y    /   # foo is not set
    blah blah blah...

namespace "Buildroot options"
    option project="Buildroot"
    option version="${VERSION}"     <= To avoid $VERSION_test ambiguity
    option prefix="BR2_"            <= prefix to config options

config bar                          => BR2_bar=y   /   # BR2_bar is not set
    blah blah blah...


namespace "Linux Kernel options"
    option project="Linux"
    option version="..."
    option prefix="CONFIG_"

include "${BR2_KERNEL_DIR}/arch/${BR2_ARCH]/Kconfig"


Then with a simple grep -E '^CONFIG_' one can easily extract the kernel
options from the others.

We _may_ need to support nested namespaces also, concatenating the prefixes.

I once tried to do such thing, but I'm lacking good lex/yacc fu, and I
miserably failed... :-(


Yann E. MORIN.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
kbuild-devel mailing list

Reply via email to