Re: [kbuild-devel] [rfe] easier customization of kconfig for non-Linux projects

2007-05-24 Thread Yann E. MORIN
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):

8
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...

endnamespace

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

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

endnamespace
8

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... :-(

Comments?

Regards,
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.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] RFC - new feature - 'string' without double quotes

2005-06-11 Thread Yann E. MORIN
Once upon a time (on Friday 10 June 2005 23:56), Yann E. MORIN wrote :
  Anyway, here's a first patch against 2.4.31. Please comment.

Hmmm... Here is the patch. :-)

Regards,
Yann.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --== °_° ==-- °---.:  X  AGAINST  |  /e\  There is no  |
| web: ymorin.free.fr | [EMAIL PROTECTED] 3798 | / \ HTML MAIL|
conspiracy.  |
°-°°--°°
 \__ np:  [Stopped] __/


kbuild-path.patch.bz2
Description: BZip2 compressed data


[kbuild-devel] RFC - new feature - 'string' without double quotes

2005-06-10 Thread Yann E. MORIN
Hi!

I'm adding a new statement to kbuild that will allow one to declare a string
that will not contain double quotes.

Current state:
=
kbuild adds double quotes in strings when crating the .config file. This file
is parsed both by a bash script and included by a Makefile.

Problem:
===
Suppose config.in contains:
string Where is it MY_PATH /some/path

it would give a .config with:
MY_PATH=/some/path

when included in a Makefile with these rule:
include .config
target: $(MY_PATH)/some.file
do_smthg --with $^ --out $@

This construct fails miserably because $(MY_STRING)/some.file will expand to
/some/path/some.file which make strictly interprets as the name of a file
that starts with a double quote, followed by the litteral /some/path, again
a double quote, and finally /some.file, which is obviously not what we were
expecting.

Solution (as I see it):
==
Hmm, looks there's nothing like that in the ML archives... Neither did I find
something on google, and I tried pretty hard...

So, here's what I did:
Add a statement that allows string to not be double-quote-enclosed. Because
there can be special chars in the string (such as spaces), escape those chars.

So far, I've made Configure, Menuconfig and config-language.txt aware of the
two new statements 'path' and 'define_path' (that behave the same as string,
but omitting the surrounding double quotes, and escaping chars [well, only
space is escaped for now]).


===
Is this of a real matter for kbuild, or am I the only one needing a solution?

Regarding kconfig.tk, I'm a bit reluctant to touch the code (plus I mainly use
menuconfig). Would the new statements be really wanted, is anybody willing
to give a hand on the subject.

As for mconfig, I haven't yet looked into it... Maybe, maybe late in the WE...
I supposed it the way 2.6 goes...

Anyway, here's a first patch against 2.4.31. Please comment.

Regards,
Yann.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --== °_° ==-- °---.:  X  AGAINST  |  /e\  There is no  |
| web: ymorin.free.fr | [EMAIL PROTECTED] 3798 | / \ HTML MAIL|
conspiracy.  |
°-°°--°°
 \__ np:  [Stopped] __/



---
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61 plasma display: http://www.necitguy.com/?r 
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel