From: Sam Ravnborg <sam@ravnborg.org>
To: Arnaud Lacombe <lacombar@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>,
Michal Marek <mmarek@suse.cz>
Subject: Re: [RFC 0/2] Factor Kconfig's prefix and package name
Date: Mon, 16 Aug 2010 14:36:42 +0200 [thread overview]
Message-ID: <20100816123642.GA7233@merkur.ravnborg.org> (raw)
In-Reply-To: <1281934457-4225-1-git-send-email-lacombar@gmail.com>
On Mon, Aug 16, 2010 at 12:54:15AM -0400, Arnaud Lacombe wrote:
> Hi,
>
> Many projects are using Kconfig's derivate as their configuration UI. Some of
> these projects change the default "CONFIG_" prefix for something else. It
> obliges them to dig in the sources to find and replace all occurences and
> associated constant. Same goes for package name where when the project ship a C
> library, messages about a kernel may not be welcome. OOTH, a project may want to
> limit its changes to be able to re-sync with the kernel's Kconfig and benefits
> from latest features and bug fixes.
>
> The two next patches factorizes Kconfig's prefix and package name to generic
> macros defined in `scripts/kconfig/lkc.h'. This allow projects to easily tune
> Kconfig for their need with trivial source modification.
>
> There may have been similar patches in the past, in which case this message can
> be silently discarded :)
>
> any comments appreciated !
Hi Arnaud.
I am very much in favour of getting kconfig less tied into the kernel.
We discussed this topic briefly af the buildrrot list the other day,
and I am started to look at it too.
What you have done below looks like similar attempts
I have seen in the past - and I did not like them then
and do not like it now.
I have outlined below there three steps needed as I see it.
And I would be very glad for help on two of these.
1) "Kernel" appear in diverse feedback texts
- Re-phrase this to refer to the configuration.
You know that you change the configuration
of kernel/buildroot/ptxdist/whatever and
there is no value of repeating this info in
the feedback texts.
- Re-phrasing have the benefit that once the
translators pick up the new version the
translated text is valied for all users.
This would not be the case if you replace
the project name.
2) References to kernel + version in title in frontends
- Use the (today unused) mainmenu entry to pick up the
title.
Consider following example:
mainmenu "Linux kernel configuration v$KERNELVERSION"
config KERNELVERSION
string
option env=KERNELVERSION
With the above exampe we no longer hardcode
the title and we use already existing features
to get the version from the environment.
The expansion of "$KERNELVERSION" to the value
of the symbol is something I only see supported
by "mainmenu".
- This should also address the cases where we
referer to the project name/version in the
.config file (see confdata.c).
3) Do not hardcode "CONFIG_"
- I suggest to introduce a single define named "CONFIG_".
All the places that hardcode the length should be
replaced by strlen(CONFIG_).
- The define should be conditional like this:
#if !defined(CONFIG_)
#define CONFIG_ "CONFIG_"
#endif
In this way other users can just use -DCONFIG_=BR2_ as they prefer.
Your patch #2 needs only small adjustments to implement 3).
Please adjust and resend.
Your patch #1 identifies all places where a re-phrase is needed.
It would be good if you could give that a try.
I am working on 2) as time permits. It seems doable.
I have something ready within a few days/weeks.
Please always cc: Michal Marek on patches touching kconfig.
He is the (unofficial) maintainer of kconfig.
We have not heard from Roman Zippel for > one year :-(
Sam
next prev parent reply other threads:[~2010-08-16 12:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-16 4:54 [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
2010-08-16 4:54 ` [RFC 1/2] kbuild: genericizes " Arnaud Lacombe
2010-08-16 11:57 ` Michal Marek
2010-08-16 12:23 ` Michal Marek
2010-08-16 17:26 ` Sam Ravnborg
2010-08-16 20:05 ` Michal Marek
2010-08-16 4:54 ` [RFC 2/2] kbuild: genericizes kbuild's config prefix Arnaud Lacombe
2010-08-16 12:36 ` Sam Ravnborg [this message]
2010-08-16 21:42 ` [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
2010-08-16 21:50 ` Sam Ravnborg
2010-08-17 1:12 ` Arnaud Lacombe
2010-08-17 2:19 ` Sam Ravnborg
2010-08-17 2:56 ` Arnaud Lacombe
2010-08-17 5:42 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
2010-08-17 5:44 ` [PATCH] kbuild: delay rootmenu prompt initialization Arnaud Lacombe
2010-08-17 5:52 ` [PATCH] kbuild: implement the `mainmenu' directive Arnaud Lacombe
2010-08-17 11:24 ` Michal Marek
2010-08-17 20:26 ` Sam Ravnborg
2010-08-18 2:28 ` Arnaud Lacombe
2010-08-17 20:34 ` Sam Ravnborg
2010-08-17 20:44 ` Arnaud Lacombe
2010-08-17 20:51 ` Sam Ravnborg
2010-08-17 6:15 ` [RFC 0/2] Factor Kconfig's prefix and package name Arnaud Lacombe
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=20100816123642.GA7233@merkur.ravnborg.org \
--to=sam@ravnborg.org \
--cc=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=zippel@linux-m68k.org \
/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