From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] support/kconfig: use kconfig-provided way of setting the CONFIG_ prefix
Date: Tue, 16 Apr 2013 23:34:24 +0200 [thread overview]
Message-ID: <20130416213424.GA14974@free.fr> (raw)
In-Reply-To: <20130416230625.1656d877@skate>
Thomas, All,
On Tue, Apr 16, 2013 at 11:06:25PM +0200, Thomas Petazzoni wrote:
> On Sun, 14 Apr 2013 14:53:17 +0200, Yann E. MORIN wrote:
> > It's now been a while since it has been possible to build the kconfig
> > parser to understand a prefix other than CONFIG_, and even no prefix
> > at all, by setting the CONFIG_ macro (#define) at biuld time.
> >
> > Just use that, insted of patching, it will make it easier for us in the
> > future.
>
> I haven't tested your patch nor looked at it carefully. However, I know
> there is a difference between what the kernel does and what Buildroot
> does in terms of Kconfig options.
>
> In a kernel Kconfig file, the option names are not prefixed by
> 'CONFIG_', but when used in Makefiles, they are.
>
> In Buildroot, option names are prefixed with 'BR2_' in both the
> Config.in files and in the Makefiles. Does your change takes this into
> account?
That's the whole point of this patch: use Kconfig ability to understand
any prefix other than the default 'CONFIG_', and even an empty prefix:
-HOST_EXTRACFLAGS += -I$(obj)
+HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\"
^^^^^^^^^^^^^^
This tells that the option prefix is empty, so:
Config.in .config
--------------------------------------------
config FOO FOO=y
config BR2_BAR # BR2_BAR is not set
If I did use: -DCONFIG_=\"YEM\" , then that would give:
Config.in .config
--------------------------------------------
config FOO YEM_FOO=y
config BR2_BAR # YEM_BR2_BAR is not set
So yes, this patch maintains our do-not-add-a-prefix-to-options policy. ;-)
Regards,
Yann E. MORIN.
PS. It is even possible to override that prefix at runtime, too, but
that's not the path I choose in this patch.
YEM.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2013-04-16 21:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 12:53 [Buildroot] [PATCH] support/kconfig: use kconfig-provided way of setting the CONFIG_ prefix Yann E. MORIN
2013-04-16 21:06 ` Thomas Petazzoni
2013-04-16 21:34 ` Yann E. MORIN [this message]
2013-04-17 7:45 ` Thomas Petazzoni
2013-04-21 21:35 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130416213424.GA14974@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox