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

Reply via email to