[Toybox] kconfig replacement
David Seikel
onefang at gmail.com
Sat Feb 18 21:54:23 PST 2012
On Sat, 18 Feb 2012 23:37:17 -0600 Rob Landley <rob at landley.net> wrote:
> On 02/17/2012 03:52 PM, Kai Trukenmueller wrote:
> > attached is scripts/mkconfig.awk which could replace kconfig/*.
>
> Hmmm. Interesting.
>
> I'm by no means an awk expert, but then I didn't know anything about
> sed before I had to turn busybox's half implementation into a real
> one that autoconf could use. I'll need to write an awk eventually...
>
> > It could be used from the makefile for the targets:
> >
> > config:
> > awk -f scripts/mkconfig.awk Config.in toys/*.c
> >
> > allyesconfig:
> > yes | awk -f script/mkconfig.awk Config.in toys/*.c
> >
> > allnoconfig:
> > yes n | awk -f scripts/mkconfig.awk Config.in toys/*.c
> >
> > defaultconfig:
> > yes "" | awk -f scripts/mkconfig.awk Config.in toys/*.c
> >
> >
> > it is not a replacement for menuconfig.
>
> Which worries me a bit.
>
> The plan for the new menuconfig was to just emit ANSI sequences rather
> than using ncurses, but it still needs to interactively respond to
> cursor keys (which are themselves multi-character sequences), maintain
> internal state (what you've selected and what you haven't, plus
> dependency resolution), and then write out the result.
>
> I have no idea how to do this in awk. But then, I don't know awk.
>
> Awk is a SUSv4 command I plan to add to toybox, if this _can_ be
> implemented in awk by all means let's do it. The alternative is to
> write it in C.
>
> We could also do just menuconfig in C, and do the others in awk, but
> then they can't share infrastructure. Running menuconfig and then
> exiting immediately is pretty much either "defconfig" or "oldconfig"
> depending on context...
This is around about the time that people convert awk to perl and keep
going. Don't think either of us want that.
C that constructs awk commands then runs them maybe? Not actually
looked at this yet.
--
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20120219/2b179d3a/attachment-0002.sig>
More information about the Toybox
mailing list